Picture popup
Hi,
I'm sure I'm making this harder then what it needs to be but I can't figure it out, could someone please help. Lets say I have two pictures a small one called 'XenaDVD_S4sm.jpg' and a larger one called 'XenaDVD_S4.jpg'. When I click on the small picture I want a new popup window to autosize to the larger picture. The reason why I want it to autosize is because I will eventually have more then pictures on this page that could be different sizes and I want the popup to change according to the size of the picture. I got the popup to work hard coding the size of the window, but then it's not going to work if the picture sizes change later. I'm using just notepad to create my code in. My code that I have is as follows:
<script language=javascript>
<!--
function popPicture(N){
newWindow = window.open(N,'popD', 'toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location=no, width=500, height=500');
}
-->
</script>
<html>
<title>This is what I still want</title>
<body>
<h1> This is what I still want </h1>
<a href="javascript:popPicture('XenaDVD_S4.jpg');"><img src='XenaDVD_S4sm.jpg' width="150" height="150" border="0"><b>Xena Warrior Princess - Season Four</b></a>
</body>
</html>
If you noticed I hard coded the popup window as a width=500 and height=500 which somehow I would like to get this to autosize. Could someone please tell me the code I would need in order to do this?
Thanks
Chris
I'm sure I'm making this harder then what it needs to be but I can't figure it out, could someone please help. Lets say I have two pictures a small one called 'XenaDVD_S4sm.jpg' and a larger one called 'XenaDVD_S4.jpg'. When I click on the small picture I want a new popup window to autosize to the larger picture. The reason why I want it to autosize is because I will eventually have more then pictures on this page that could be different sizes and I want the popup to change according to the size of the picture. I got the popup to work hard coding the size of the window, but then it's not going to work if the picture sizes change later. I'm using just notepad to create my code in. My code that I have is as follows:
<script language=javascript>
<!--
function popPicture(N){
newWindow = window.open(N,'popD', 'toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location=no, width=500, height=500');
}
-->
</script>
<html>
<title>This is what I still want</title>
<body>
<h1> This is what I still want </h1>
<a href="javascript:popPicture('XenaDVD_S4.jpg');"><img src='XenaDVD_S4sm.jpg' width="150" height="150" border="0"><b>Xena Warrior Princess - Season Four</b></a>
</body>
</html>
If you noticed I hard coded the popup window as a width=500 and height=500 which somehow I would like to get this to autosize. Could someone please tell me the code I would need in order to do this?
Thanks
Chris
Chris
January 30,