Loading ...
Sorry, an error occurred while loading the content.

2792Re: [ydn-javascript] Dom.getStyle and image sizing in IE

Expand Messages
  • Matt Sweeney
    Jul 5, 2006
    • 0 Attachment
      Hi Jesse,

      I think that offsetWidth and offsetHeight are your best bet for getting
      the actual image dimensions, the one caveat being that you have to
      append to the document BEFORE querying offsets.

      Matt

      jessekeller wrote:

      >I'm trying to find out (then maybe change) the dimensions of an image.
      >But IE seems to give very different answers to the question "how big
      >is this image", depending on whether the image is in cache or not. I
      >was hoping YAHOO.util.Dom.getStyle('myImg', 'width') would get around
      >the problem, but apparently not.
      >
      >Anybody know how to reliably find out the actual (unscaled) size of an
      >image loaded using document.createElement() in IE?
      >
      >Thanks!
      >
      >
      >
      >
      >
      >
      >Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
    • Show all 2 messages in this topic