PDA

View Full Version : simple controls gallery



auntnini
05-27-2009, 12:38 AM
1) Script Title: simple controls gallery

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm

3) Describe problem: It works on local drive, but not online http://gerigeans.tripod.com/collection/index.html or any of the variations I've tried such as http://gerigeans.tripod.com/collection/indexSGtry.html or http://gerigeans.tripod.com/collection/simoGalleryX.html

It's gotta be some simple but stupid error staring me in the face, but I cannot find out what is wrong.

Please help

ddadmin
05-27-2009, 07:42 AM
Looking at collection/index.html, is there a reason you're also including the code:


<script type="text/javascript">
<!-- <![CDATA[
/*copied from simplegallery.js */
var simpleGallery_navpanel={
panel: {height:'45px', opacity:0.5, paddingTop:'5px', fontStyle:'bold 11px Verdana'}, //customize nav panel container
images: [ '../ddScripts/left.gif', '../ddScripts/play.gif', '../ddScripts/right.gif', '../ddScripts/pause.gif'], //nav panel images (in that order)
imageSpacing: {offsetTop:[-4, 0, -4], spacing:10}, //top offset of left, play, and right images, PLUS spacing between the 3 images
slideduration: 500, //duration of slide up animation to reveal panel
}
//]]> -->
</script>

inline on your page? By default this code resides in the .js file and shouldn't be duplicated. Have you tried installing the script as is, without any changes, on a page and seeing if that works?

auntnini
05-27-2009, 08:51 PM
Thanks DD Admin. I had tried so many variations (which worked locally on PCs and Macs) but not online at TRIPOD.com. The reason for copying that code to the index page was the control images did not show otherwise (for some reason?). I <!-- commented out --> that code and the controls did not show locally and nothing worked on TRIPOD.

This site started out as a student's project, and I'm trying to build on it as a demo. Not sure what bugs are on site and/or if there is a conflict with the code TRIPOD super-imposes on the page.

For instance, original was XHTML (so I added <![CDATA[ ... ]]> ). Then I converted it to HTML and tried putting "gallery01" etc. in TABLE format (instead of PicBox CSS), etc. etc. etc.

The big puzzle is that is works on local drive (PC or Mac).

Before I forget: I appreciate how well documented this DD script is.

I did not understand that last part


onslide:function(curslide, i){ //event that fires after each slide is shown
//Keyword "this": references current gallery instance
//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
}

auntnini
07-12-2009, 10:18 PM
Beats me! I've been trying so hard, so many variations to get this to work at TRIPOD http://gerigeans.tripod.com/collection/indexSGtry.html -- without success. So I gave up and used a different script at http://gerigeans.tripod.com/collection/index.html

Now -- using an exact copy of the same script -- it works at http://webdemo.x10hosting.com/geri/indexSGtry.html.

One thing I was reminded about in reading a JavaScript book: the ancillary files have to be in the correct relationship to the HTML page, not the JavaScript file that references them. Hence, moving the DD graphics into the same file as the HTML page solved that problem.