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

Re: [ydn-javascript] Get Region

Expand Messages
  • Michael Trier
    Thanks Matt. I ll have to dig into it some more then. It s not set to display:none, but is likely set to position:absolute if that makes a difference.
    Message 1 of 3 , Aug 2, 2006
    • 0 Attachment
      Thanks Matt.  I'll have to dig into it some more then.  It's not set to display:none, but is likely set to position:absolute if that makes a difference.

      Michael

      On 7/31/06, Matt Sweeney <msweeney@...> wrote:

      Hi Michael,

      The offset values of an element can not be measured unless the element
      is both part of the document and not set to "display:none".

      That said, you should be able to use offsetHeight the same way you are
      using offsetWidth. This is what getRegion does to determine bottom and
      right.

      Matt



      Michael Trier wrote:

      >I'm finding that using the YAHOO.util.Region.getRegion give me
      >unexpected results. Particularly when I'm dealing with certain DIVs.
      >My primary problem is in getting right and bottom settings. It seems
      >that often those will return NaN. Sometimes I can get the width of an
      >element and calculate the right using offsetWidth. But rarely am I
      >able to get the height of an element. Do you have any tricks you'd
      >like to share for getting this information?
      >
      >Michael
      >
      >
      >
      >Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >


    Your message has been successfully submitted and would be delivered to recipients shortly.