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

Re: util.DOM.setXY question

Expand Messages
  • Jack Slocum
    Hi gamboa, setXY and getXY operate by page coordinates, not by simple left and top style properties. The page coordinates are calculated based on the element s
    Message 1 of 2 , Aug 30, 2006
    • 0 Attachment

      Hi gamboa,

      setXY and getXY operate by page coordinates, not by simple left and top style properties. The page coordinates are calculated based on the element's offset postion and any parents' offset position(s). If an element has a display of none, offset positions are not available.

      ---
      Jack Slocum
      Yahoo! UI - Beyond the Examples
      http://www.jackslocum.com/yui

      --- In ydn-javascript@yahoogroups.com, "gamboa" <g4mbo4@...> wrote:
      >
      > Hi,
      >
      > anybody can explain me why YAHOO.util.Dom.setXY or setX or setY return
      > false when the element has display=none ???
      >
      > Why this rule in this functions?
      >
      > We can change style.top and style.left if the element has display=none
      >
      > With this "rule" we need to show the element first to set XY
      >

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