This code -
http://www.aspandjavascript.co.uk/javascript/javascript_api/get_element_width_height.asp
- offers better cross-browser support.
However it may be better to get the image size server-side. Django
offers builtin methods on image fields to obtain the image width and
height; alternativel
Does offsetWidth return what you want? this should represent the total
"space" the element takes up (width, borders, padding etc)
document.getElementById("myimage").offsetWidth
(http://developer.mozilla.org/en/docs/DOM:element.offsetWidth)
On Feb 8, 11:57 am, "Lic. José M. Rodriguez Bacallao"
Hi folks, I know this question isn't from this group but I'll ask
anyway. I need to resize an image (thumbnail) based in the browser
width and height. I want to make my site browser resolution
independent. The only thing I can't get working is this. For example,
a page showing a news entry, the new
3 matches
Mail list logo