Click to See Complete Forum and Search --> : automatic window resize?


Sul
10-17-2003, 02:19 PM
Hi

I have a gallery of pictures of sizes 640x480 or 480x640 pixels. When each thumbnail is clicked the large picture is loaded up on a popup window. However, I want this popup window to resize itself automatically depending upon the size of the image loaded. How do I access the size (width or height) properties of an image? How do I automatically resize the window to suit the image size?

Thank you.

airski
10-17-2003, 03:57 PM
http://www.codelifter.com/main/javascript/autosizeimagepopup.html

Sul
10-17-2003, 05:51 PM
I've just tested the code. It only seems to work in IE or NN. I want it to work on all browsers (since that is the point of javascript - platform independancy). Anyone know how to do that?

airski
10-17-2003, 08:26 PM
I'm not sure about that.

I've come to not care as much about pleasing all browsers since it's practically impossible anyway. Instid, i find my target market and try please them.

sm8082
01-23-2008, 08:33 AM
Hi,
Please help me out!
Can you find out the java script code for a web page so that it resizes the content of the page upon opening, to make the page compatible to view avoiding scroll bars on the page?