Wednesday, April 08, 2009

How to resize an image to fit in the opened window?

You can use the JavaScript 'availheight' and 'height' properties (http://msdn. microsoft. com/workshop/ author/dhtml/ reference/ objects/obj_ screen.asp) to work out the size of the screen, and then use 'window.open' to open a window of that size.

Beware, not all browsers support these properties - some have there own versions, so you may need to code accordingly.

No comments: