"Terry A. Haimann" <te***@yngstr.oldboy.com> writes:
If you want to display an image on a page and you don't know what its
physical size is going to be and you want it to scale down to the size of
the web page, how would you do that?
What page? What else is on the page?
First, you find the size of the browser window:
<URL:http://jibbering.com/faq/#FAQ4_9>
Call them "width" and "height".
Then you can create a new page in the same window with the image in:
document.write("<img src='img.png' style='width:"+width+
"px;height:"+height+"px;'>")
document.close();
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'