Brad Bansner
asked on
Javascript syntax for opening a new window based on image rotator selection
I use links like this to open enlarged images in a new window, it works very well:
<A HREF="javascript:openWin(' _enlarge.a sp?file=ph _ex3_conso le','800', '600')">
The 800 and 600 let me specify the size of the window. However, I need to call this same function from a Javascript which lets the user rotate through images in a slideshow, and click the one they are on to enlarge. Here is what it looks like:
openWin('_enlarge.asp?file =' + document['currentimg'].src );
It basically works, except I cannot find the correct syntax to insert the 800 and 600. I tried this but it does not work:
openWin('_enlarge.asp?file =' + document['currentimg'].src + '800,600');
I guess its just a syntax problem, I don't know how to specify those parameters with the single quotes.
Thank you.
<A HREF="javascript:openWin('
The 800 and 600 let me specify the size of the window. However, I need to call this same function from a Javascript which lets the user rotate through images in a slideshow, and click the one they are on to enlarge. Here is what it looks like:
openWin('_enlarge.asp?file
It basically works, except I cannot find the correct syntax to insert the 800 and 600. I tried this but it does not work:
openWin('_enlarge.asp?file
I guess its just a syntax problem, I don't know how to specify those parameters with the single quotes.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, I got it to work now.
<A HREF="javascript:window.op