PDA

View Full Version : Slideshow: how to open image's link in same window (and not new one)


wwwolf
11-08-2002, 06:28 PM
Hi,
I am working with the Cut & Paste JavaScript Slideshow which you can find on http://javascriptkit.com/script/script2/jsslide.shtml .

The images are linked to a page on the Internet (click on image1 to go to "page1", click on image2 to go to "page2", etc.) which is a nice feature! However, the link opens in a new window. Could anyone tell me what I have to do to 'force' the link to open in the same window (target="_self")?

Thank you for your help! I really appreciate it.
WWWolf - Belgium

beetle
11-08-2002, 06:41 PM
just change the gotoshow function from thisfunction gotoshow(){
if (!window.winslide||winslide.closed)
winslide=window.open(slidelinks[whichlink])
else
winslide.location=slidelinks[whichlink]
winslide.focus()
}to thisfunction gotoshow(){
window.location.href=slidelinks[whichlink]
}

wwwolf
11-08-2002, 06:49 PM
Great! It works!
You are so smart! And quick! Will you marry me? ;-)

Thanks a lot!
Wolf

Bobby5193
02-16-2010, 07:43 PM
i tried to put 2 slideshows like that on the same html page, with different pictures, and i renamed the functions and everything, but the second one doesn't work, can anyone help please?

Old Pedant
02-16-2010, 10:54 PM
Shouldn't need to rename the functions if the page was coded correctly. Just pass in a different argument.

But with no code to look at, it's anybody's guess what you did wrong.