title: Getting image width on image load fails on IE
body: <p>I have a image resizer function that resize images proportional. On every image load a call this function with image and resize if its width or height is bigger than my max width and max height. I can get img.width and img.height in FF Chrome Opera Safari but IE fails. How can i handle this?</p>
  
  <p>Let me explain with a piece of code.</p>
  
  <pre>
  &lt;img src="images/img01.png" onload="window.onImageLoad(this, 120, 120)" /&gt;
  
  function onImageLoad(img, maxWidth, maxHeight) {
       <b><i>var width = img.width;</i></b> // Problem is in here
       <b><i>var height = img.height</i></b> // Problem is in here
  }
  </pre>
  
  <p>In my highligted lines img.width don't work on IE series. </p>
  
  <p>Any suggestion?</p>
  
  <p>Thanks.</p>