Hi,
I've had help writing this code so I can't claim to know much about it, but it works fine in IE but not in Netscape. Basically, when a user clicks on a thumbnail it opens an image in a new window.
This is my script:
<SCRIPT LANGUAGE="JAVASCRIPT">
<!-- BEGIN
function openWin(Nimg, url, imgref, imgwidth, imgheight)
{
myNewWin = window.open('', '', 'scrollbars=yes,resizable=yes,top=0,screenY=0');
myDoc = myNewWin.document;
myDoc.write(" ... HTML code of new window goes here ... "
}
function openImg(url, imgref, imgWidth, imgHeight)
{
Nimg = new Image();
Nimg.src = url;
Nimg.onLoad = openWin(Nimg, url, imgref, imgWidth, imgHeight)
}
END -->
</SCRIPT>
...and this is how I call it:
<a href='javascript:void(0)' onclick="openImg('./bigpic1.jpg', 'bigpic1', '1024', '768')">1024x768</a>
If it helps to see the page in action, go to:
(for example)
Thanks in advance.
- Andy
_______________________________
"On a clear disk you can seek forever"
I've had help writing this code so I can't claim to know much about it, but it works fine in IE but not in Netscape. Basically, when a user clicks on a thumbnail it opens an image in a new window.
This is my script:
<SCRIPT LANGUAGE="JAVASCRIPT">
<!-- BEGIN
function openWin(Nimg, url, imgref, imgwidth, imgheight)
{
myNewWin = window.open('', '', 'scrollbars=yes,resizable=yes,top=0,screenY=0');
myDoc = myNewWin.document;
myDoc.write(" ... HTML code of new window goes here ... "
}
function openImg(url, imgref, imgWidth, imgHeight)
{
Nimg = new Image();
Nimg.src = url;
Nimg.onLoad = openWin(Nimg, url, imgref, imgWidth, imgHeight)
}
END -->
</SCRIPT>
...and this is how I call it:
<a href='javascript:void(0)' onclick="openImg('./bigpic1.jpg', 'bigpic1', '1024', '768')">1024x768</a>
If it helps to see the page in action, go to:
(for example)
Thanks in advance.
- Andy
_______________________________
"On a clear disk you can seek forever"