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!

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.