PDA

View Full Version : DHTML Slide Show in specific popups



martino
11-17-2005, 02:42 PM
DHTML Slide Show Script
http://www.dynamicdrive.com/dynamicindex14/dhtmlslide.htm

Hello, I was wondering how to link each of my images to specific width/height popups as each large image is different in size.

Is this possible?

This is an amazing scrip by the way.

Thanks,
Martin

ddadmin
11-18-2005, 12:01 AM
Sure. First, replace array photolink[] with:



//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"
photoslink[0]=["http://google.com", 500, 400] //pop up window
photoslink[1]=["http://yahoo.com"]
photoslink[2]=[""]


Then, replace function transport() with:



function transport(){
if (typeof photoslink[which][1]!="undefined")
window.open(photoslink[which][0], "", "width="+photoslink[which][1]+", height="+photoslink[which][2]+'"')
else
window.location=photoslink[which][0]
}


Here the first link ("google.com") will load in a controlled popup window.

martino
11-18-2005, 03:05 PM
Thank you very much...its perfect!
Much appreciated.

Martin