How can I update the following code to accomodate opening images with new dimensions and having the popUp resize properly each time? The existing code I have only works properly in NS4+. In IE6/NS6, new images open in the window following the dimensions when the popUp was first opened and will not resize. I would like to keep the popUp open and have the window resize to new specified dimensions when the user clicks on a new link/image thumbnail.
------ SCRIPT ------
<script language="JavaScript">
<!--- Hide script from old browsers
function OpenNewWindow(WindowPictur
e,WindowPa
rameters)
{
NewWindow=window.open("","
NewOne", WindowParameters);
NewWindow.document.write ("<HTML><HEAD><TITLE>");
NewWindow.document.write ("Window Title Here");
NewWindow.document.write ("</TITLE></HEAD>");
NewWindow.document.write ("<BODY onLoad='self.focus();' BGCOLOR='Black' MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0>");
NewWindow.document.write ("<P ALIGN=CENTER>");
NewWindow.document.write ("<IMG SRC=");
NewWindow.document.write (WindowPicture);
NewWindow.document.write (">");
NewWindow.document.write ("</P>");
NewWindow.document.write ("</BODY></HTML>");
NewWindow.document.close()
;
return false;
}
// end hiding from old browsers -->
</script>
------ BODY ------
<a href=# onClick="OpenNewWindow('im
ages/lands
cape.jpg',
'resizable
=0,locatio
n=0,direct
ories=0,st
atus=0,men
ubar=0,scr
ollbars=0,
toolbar=0,
width=525,
height=380
');return false;"><img src="thumbnails/thumb_land
scape.jpg"
width="100" height ="72" border="1" alt="click for a larger version of this image"></a>
<a href=# onClick="OpenNewWindow('im
ages/portr
ait.jpg','
resizable=
0,location
=0,directo
ries=0,sta
tus=0,menu
bar=0,scro
llbars=0,t
oolbar=0,w
idth=360,h
eight=480'
);return false;"><img src="thumbnails/thumb_port
rait.jpg" width="54" height ="72" border="1" alt="click for a larger version of this image"></a>
<a href=# onClick="OpenNewWindow('im
ages/rand.
jpg','resi
zable=0,lo
cation=0,d
irectories
=0,status=
0,menubar=
0,scrollba
rs=0,toolb
ar=0,width
=200,heigh
t=550');re
turn false;"><img src="thumbnails/thumb_rand
.jpg" width="54" height ="72" border="1" alt="click for a larger version of this image"></a>
Thanks!
DS