PDA

View Full Version : dhtml slideshow - can i link to a page in folder



kdumas
10-15-2008, 02:53 PM
1) Script Title: DHTML Manual Slide Show

2) Script URL (on DD): http://dynamicdrive.com/dynamicindex14/dhtmlslide.htm

3) Describe problem: Can I link to a local file? I want to save a slideshow to a disk. On the last slide, I want to link to a page in the folder, not to a page on the internet.

For instance, the last slide is 13. In the photoslink area, I set it: photoslink[13]="guestbook.html" but this causes a javascript error. (Error on Page) and it won't link to the guestbook.html file which is in the same folder as everything else. How can I do this?

ddadmin
10-15-2008, 09:23 PM
It depends. Is the page being accessed online? If so, a reference to a local file won't work, since it would be local to each viewer browsing the site online. If you're running the page offline and the image in question is in the same directory, then it should work. But it would be something like:


photoslink[13]="guestbook.gif"

and not "guestbook.html". :)

kdumas
10-15-2008, 11:47 PM
No, I don't want anything to be accessed online at all. I created a slideshow for a customer of their new babys' photos. They had a guestbook where people left their messages. They want me to make them a disk of the slideshow and then have the last slide link to their "offline" guestbook. This way, they have a CD that they can view 20 years from now and see the guestbook (which will NOT be online anymore).

So my question is, can I link to a local html file within the same folder of the slideshow and not an online page. The photoslink works just fine if you link it to an http:// page but I get an error when I simply put "guestbook.html".

ddadmin
10-16-2008, 12:05 AM
Well then, it should work, yes. Specifying the paths to a local file can be a little tricky, but if everything exists within the same directory, then you should be able to just enter the file names, such as:


//define images. You can have as many as you want:
photos[0]="photo1.jpg"
photos[1]="photo2.jpg"
photos[2]="photo3.jpg"

This versus if the images are in a different directory. Then you would have to use the "file:///" protocol to specify the path, which if I'm not mistaken varies in some browsers. For Firefox, it might look like this:


//define images. You can have as many as you want:
photos[0]="file:///d:/myimages/photo1.jpg"
photos[1]="file:///d:/myimages/photo2.jpg"
photos[2]="file:///d:/myimages/photo3.jpg"

But again, if everything is in the same directory, the above should be irrelevant.

kdumas
10-16-2008, 02:13 AM
Thanks for trying. It just doesn't work. I've tried many different things. It works like a charm if you put an internet address (http://www.website.com) but it doesn't work on local files. I even tried it with a photo and still no luck. I'll have to figure out something else to do.