0

How can I get the X,Y co-ords of a JQueryUI draggable object, when it is dropped, and post them to something (a java servlet) using AJAX?

Im trying to store the location of it in a database, ive got the handler to do that done, Im a backend guy, but I suck with JavaScript!

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Troy III
0

use javascript to grab the "ondrop" event; The "event object" keeps x,y coordinate values updated at all times, assign to variables like:

var x = ["event object"].clientX;
var y = ["event object"].clientY;

and use your ready handler to post them by referencing x,y variables.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.