3.2.0

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. Let’s 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,
You may want to check an actual javascript forum, this is the Active Widgets forum. A little googling for your questions will probably reap some rewards!
Tony
January 31,
Popup windows do not autosize. And if you set the "resizable=no" then the user can't change the size either. And from my testing, you can't change the size of the window from code inside the window. It is what it is. That is why I will not use them ever again. I use ActiveWidgets to create popup windows to display my information.
Jim Hunter
January 31,
I think he wants it to the size of the image after the fact, which you need to pass a URL to another page that has more JS to determine the image size and width to resize the window after it determines the size (actually there is a number of ways). Or determine the size before you open the window and pass those as extra parameters to set the size in the window.open command. None the less, here is probably not the best place to determine how to do that as it doesn't deal with ActiveWidgets.
Tony
January 31,
Thanks for everyone’s response, I will try another post.
Chris
January 31,

This topic is archived.

See also:


Back to support forum