View Full Version : Don't see images in slideshow locally but they display on live site

02-08-2008, 02:30 AM
1) Script Title: Translucent Slideshow

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

3) Describe problem: Hi. I've been using this script successfully in the navigation area of my site for more than a year. Recently, I decided to move pages around into folders, and I moved the script into an *.htm file which uses Server Side Include to find its way into every page. All of the pages, except index.htm, are in folders one level down from the root directory.
The slideshow images look fine on the site (www.karenandart.com), on every page. When I test locally, though, on my PC, none of the images show up on index.html, though they're fine on every other page. I have to assume that it's related to the folder structure and the fact that index.htm isn't (and can't be) in a subdirectory. I tried to substitute a "root relative" link in my navigation bars by eliminating those two dots at the beginning of the address, but it simply doesn't work (I'm using Expression Web, which has some problem with root relative links, although I'm coding the link by hand, so that shouldn't matter, I think.) People have said that they don't understand why the links on the index page are working, because of the ../ relative format. If you look at the site and "view source", you can see that it renders the addresses fine on the index page. I don't know why my PC isn't smart enough to do that.
Oddly, the other links in the index page that pulls in the navigation stuff are also in that format and they work fine. Is it some peculiarity with JavaScript? I know the problem isn't your script, which works really well under every other circumstance. Normally I'd leave well enough alone and live with a few red Xs while I test, but I'm worried that the fact that it works online is some sort of fluke, and that it will explode someday. Thanks for your help.

02-08-2008, 07:51 AM
Usually the easiest way to solve broken image problems inside image slideshows is to specify absolute URLs to the images, so for example:

slideshowcontent[0]=["http://www.karenandart.com/Galleryphotos/gallery1.jpg", "", ""]

Do this for all images inside the script.

02-08-2008, 12:09 PM
Thanks for your quick post. I agree that would be a solution if the images weren't showing up on the site. But the place that I get the red x is only on the index page, and only locally.
Strangely, if you look at the "included" code online (with View Source in IE), on the Index page, the reference is "galleryphotos/gallery1.jpg" and on all the other pages it's "../galleryphotos/gallery1.jpg". When I do that locally, it shows up as "../galleryphotos/gallery1.jpg" on every page, including the index page, where that path isn't right.
I was hoping to solve this problem without using absolute links. I'll be doing a lot of site development offline, so it wouldn't really solve my problem of not seeing images while I'm working on the site.