I have 2 tables - ids t1 and t2, each having just one cell.
t1 has some text content in it.
1. Is there a way to 'drag-and-drop' the t1's contents to t2 ? Or would I need to code the mousedown and mouseup events for this ?
2. If coding mouse events is the only option then would it possible to have the text not selected. Because the cell contains text, when I drag and move the text gets selected - any way to stop this ?
Thanks
Drag-and-Drop from one cell to another
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Not sure with text but perhaps looking over the code at http://www.walterzorn.com/ might help 
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
I am thinking like...you get the co-ordinates of all tables or divs in a page.
try to move an image out of the source div and during the mouse out event find the co-ordinates of the cursor.
try to match the co-ordinates with the co-ordinates you have of all divs or tables.
if you find a match and if thats a container for sure, you can now use innerHTML for div / dynamically create tr, td to copy the text to the destination.
try to move an image out of the source div and during the mouse out event find the co-ordinates of the cursor.
try to match the co-ordinates with the co-ordinates you have of all divs or tables.
if you find a match and if thats a container for sure, you can now use innerHTML for div / dynamically create tr, td to copy the text to the destination.