...

View Full Version : Modify javaScript to open external window



marko37
06-13-2003, 12:20 PM
I am using a image rotator java script that allows the user to click on a link to change the set of images that is rotating. The script also allows the user to click the image and be redirected to a url. In my case I would like the link to go to a larger view of the image.

Can someone tell me how to modify this code so that the image displays in a seperate browser window when clicked on ?

See: File attached ...

Skyzyx
06-13-2003, 05:32 PM
You could use ImagePOP!

Original version: http://www.codingforums.com/showthread.php?s=&threadid=9836

My (slightly better ;) ) version: http://host44.ipowerweb.com/~skyzyxco/scripts/imagepop.htm

RoyW
06-13-2003, 07:58 PM
You can change this

function clickredir(){
window.location=slidelinks[maininc][subinc]
}

to this

function clickredir(){
window.open( slidelinks[maininc][subinc] );
}

If you use the script by Skyzyx (which opens the window, resizes it to the exact dimensions of the image and centers the window for a much better presentation) then change it to this.

function clickredir(){
imgPop( slidelinks[maininc][subinc] );
}

marko37
06-14-2003, 01:25 AM
Roy W and Skyzyx are masters !

Thanks for the help guys...exactly what i needed.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum