Re: resizing an image

2008-02-08 Thread NickJ
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

Re: resizing an image

2008-02-08 Thread NickJ
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"

resizing an image

2008-02-08 Thread 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