PDA

View Full Version : cannot find images



vrm
08-11-2006, 02:18 AM
1) Script Title: Ultimate Fade-In Slide Show

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

3) Describe problem: The script has been revised to grab images from a file. I had it working and then some how broke it.

URL: http://play2.vrmenterprises.com/
images: http://play2.vrmenterprises.com/images_rotate/
scripts: http://play2.vrmenterprises.com/scripts/

Sincerely,
VRM

jscheuer1
08-11-2006, 06:58 AM
Well, the path to your images as generated in getpics.php is relative to the scripts' directory. It should be either absolute (easiest) or relative to the page that is using the images' directory.

There could be other problems.

jscheuer1
08-11-2006, 07:03 AM
Yeah, looks like there are other problems. Try replacing this garbage with the script's original populateslide() function:


fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="%27+this.theimages%5Bpicindex%5D+%27" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="%27+this.postimages%5Bpicindex%5D.src+%27" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}

If getpics is constructing the array properly, which it looks like it is (with the exception that you need to correct the paths getpics is generating as I mentioned in my previous post), the rest of the script should be able to be used 'as is'.

vrm
08-11-2006, 11:47 AM
I had moved the script in Dreamweaver, which resulted in:
<a href="%27+this.theimages%5Bpicindex%5D+%27" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="%27+this.postimages%5Bpicindex%5D.src+%27" border="'+this.imageborder+'px">'

The original script read:
<a href="'+this.theimages[picindex]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'

Notice the %_ substitutions.

Once I replaced the altered script with the original (that I had saved in another location), everything worked fine.

I noticed this when I cut and pasted John's suggest and still had the problem. Since John is great (he got the fading to work on Macs for me) I knew something else had to be going on.

Sincerely,
VRM

jscheuer1
08-11-2006, 06:19 PM
The code posted in my previous reply was what I was suggesting that you remove from the script, replacing it with the original code. I probably could have been clearer.

vrm
08-11-2006, 10:09 PM
Hi John,

I should have known better. You really know your stuff.

Sincerely,
Vanessa