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

Y Constraint on a DragDrop Element not working correctly in Internet Explorer

Expand Messages
  • desau13
    Hello all, I ve got an image in a table, such as: In my javascript, I ve
    Message 1 of 2 , Feb 21, 2006
    • 0 Attachment
      Hello all,

      I've got an image in a table, such as:

      <table>
      <tr>
      <td>
      <img id='the_img' src='/images/grabber.jpg'>
      </td>
      </tr>
      </table>

      In my javascript, I've got:

      var resizer_dd1 = new YAHOO.util.DD("the_img");
      resizer_dd1.setYConstraint(0,0);

      Now, in Firefox this works as expected: The image can be dragged, but
      only horizontally. In Internet Explorer (6.0), it also drags, only
      horizontally, but when I begin to gdrag the image, it snaps to the top
      of the page. (Note that the above table is not at the top of the
      page). It would appear that setting the Y constraint on the element
      makes it snap to top:0px, or some such nonsense.

      Is anyone else seeing this? Any advice?

      Thanks,
      -d
    • Adam Moore
      ... Positioning elements does not alway behave as expected if you do not have a position style for the element. Try adding style= position:relative to your
      Message 2 of 2 , Feb 23, 2006
      • 0 Attachment
        On Tue, Feb 21, 2006 at 10:46:39PM -0000, desau13 wrote:
        > Hello all,
        >
        > I've got an image in a table, such as:
        >
        > <table>
        > <tr>
        > <td>
        > <img id='the_img' src='/images/grabber.jpg'>
        > </td>
        > </tr>
        > </table>

        Positioning elements does not alway behave as expected if you do not have a
        position style for the element. Try adding style="position:relative" to
        your image. If this doesn't fix it, please post a complete example.

        Thanks,

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