| Page 1 of 1 | [ 5 posts ] |
|
Using the latest YUI release as of yesterday - When I put more than one Drag and Drop Element in the table cell or div, the first one is always undraggable.
The HTML looks like: Code: <td width="14%" id="table_calendar_div1_1_4" style="border: 1px solid black; height: 100px;"> <span id="calendar_div1S09_10_2009" style="padding: 5px; height: 100%; width: 100%;"> 10<br/> <span id="span_78"> + <a style="color: rgb(255, 0, 153);" href="http://zmr/index.php?module=lms&func=edit&instance=78" id="link_78">Donald Brady </a></span> <br/> <span id="span_82"> + <a style="color: rgb(255, 0, 153);" href="http://zmr/index.php?module=lms&func=edit&instance=82" id="link_82">Default Test </a></span> </span> </td> My class, which extends YAHOO.util.DD takes the span id for the span around each link as its container id. Example from this code would be span_78 and span_82 In the above example if I put an alert in the init function for the creation of the DD object, it alerts twice. Once for span_78. Once for span_82. However, span_78 is never draggable. Only span_82. If a single DD object is placed within a cell, it always is draggable. In the above example, the table cell id gives me the row and column of the cell. The outer span id gives me the calendar date for that cell. The inner spans wrap around links for calendar events that I am using drag and drop to reschedule. Amy |
|
Please post a link to a valid repro case..
|
|
The first one doesn't work because you are killing it's listeners with an innerHTML call:
Note the innerHTML call here: Code: datecell.innerHTML = cellHTML + '<br />' + linkstring; When this is called, the first time, it's good because there is no element to destroy. The second time it's called (in your 2 event case), the innerHTML call is wiping the old element and it's listeners and placing a new one in the cell.. That would also be why the one that doesn't drag also doesn't have a tooltip showing.. Hope that helps.. |
|
Yes, thank you, it does.
Amy |
| Page 1 of 1 | [ 5 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group