java script question...
java script question...
Out of context: Reply #6
- Started
- Last post
- 9 Responses
- stupidresponse0
it looks like that drag and drop code you're using can have a callback function whenever an element is dropped, and it appears to provide the x and y coords as well, so you're almost there. if you view source on the demo page, you'll see the testOnDrop callback here:
xEnableDrop('drop1', testOnDrop);
and if you take a look at that function further down the page, you'll see how you can grab the x/y as arguments to that function. declare a global coords array outside of your function, and update and save it to the cookie each time an element is dropped