Dragging and dropping
3 posts
• Page 1 of 1
Dragging and dropping
I have multiple drop targets, and need to identify the element that triggered the call to APLJax.
It looks as if I should be able to read its ID from declared public field what as illustrated in jqondemo.dyalog. I can certainly read its sibling field event. But trying to read what yields a value error. The MiServer manual says (p59) that what will be set for #.JQ.On callbacks if the element triggering the event has an ID set. Inspecting it in Chrome's developer tools shows:
confirming the TR is the drop target and has an ID. Is nesting a problem? Recoded to make the 1st-column TDs the drop targets, confirming classes and IDs as above, but still no what.
I have assumed here that #.JQUI.Droppable is built on #.JQ.On and so I can rely on event and what. If not, should I simply roll my own using #.JQ.On?
It looks as if I should be able to read its ID from declared public field what as illustrated in jqondemo.dyalog. I can certainly read its sibling field event. But trying to read what yields a value error. The MiServer manual says (p59) that what will be set for #.JQ.On callbacks if the element triggering the event has an ID set. Inspecting it in Chrome's developer tools shows:
- Code: Select all
...
<tr id="player2" class="ui-droppable">
<td>Dick Cobley</td>
<td>0</td>
</tr>
...
confirming the TR is the drop target and has an ID. Is nesting a problem? Recoded to make the 1st-column TDs the drop targets, confirming classes and IDs as above, but still no what.
I have assumed here that #.JQUI.Droppable is built on #.JQ.On and so I can rely on event and what. If not, should I simply roll my own using #.JQ.On?
- Attachments
-
- scoreboard.dyalog
- (1.52 KiB) Downloaded 1083 times
-
StephenTaylor - Posts: 31
- Joined: Thu May 28, 2009 8:20 am
Re: Dragging and dropping
Update: the required ID is found by
req.GetData 'receiver'
-
StephenTaylor - Posts: 31
- Joined: Thu May 28, 2009 8:20 am
Re: Dragging and dropping
Right, we wrote JQUI.Droppable to return two ids - "receiver" has the id of the container that was dropped upon, and "drag" has the id for the item that was dragged and dropped.
-
Brian|Dyalog - Posts: 120
- Joined: Thu Nov 26, 2009 4:02 pm
- Location: West Henrietta, NY
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group