PDA

View Full Version : Conveyor belt slideshow question



shaguar85282
06-17-2008, 11:29 PM
1) conveyor belt slideshow script

2) http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm
3) The images are click through to various urls. That part works fine for me. What I have NOT been able to do is open a new window via clicking through on an image. When I try to do this in the source code and refresh my html page, the entire slideshow is gone!
Can anyone help me?

Thanks

jscheuer1
06-18-2008, 12:44 AM
Two choices. Simple:


leftrightslide[0]='<a href="some.htm" target="_blank"><img src="dynamicbook1.gif" border=1></a>'

Advanced (notice the use of \ to escape the ' character):


leftrightslide[0]='<a href="some.htm" onclick="window.open(this.href, \'_blank\', \'top=100, left=150, width=450, height=400\');return false;"><img src="dynamicbook1.gif" border=1></a>'

The reason you must escape the ' as shown is that it is already being used to delimit the string that represents the linked image. If we don't escape it where it occurs inside those delimiters, the browser thinks the string has ended with trailing garbage. When that happens, you guessed it, it breaks the entire script.

shaguar85282
06-18-2008, 11:47 AM
Thanks a ton for that info. I knew it had to be something along those lines. Unfortunately however, it didn't work for me. The script remains broken (and I've tried every permutation I could think of to escape the ' character with the \ ) but it just isn't happening....all images are gone!

Any other ideas why this could be?

Thank you.

jscheuer1
06-18-2008, 01:26 PM
There are no permutations unless you used ' elsewhere inside the delimiter ' chars. If you need more help:

Please post a link to the page on your site that contains the problematic code so we can check it out.

moechaing
06-23-2008, 02:16 PM
Hi Gurus,

First of all, sorry that if I'm asking in the wrong thread or topics.
The issue for me is I can run the conveyor belt slide show on my page but when I link a url on the photo of belt show, it opens up a new window. I don’t want to new window to be popped up but I want to link that url to frame on the same page while the conveyor belt show keeps running on the same page too. Kindly let me know if there’s a way to do this.

Regards,