Hey,
When using scriptaculous to drag a div, how can I make it show me or alert me the x and y co-ordinates when finished?
Thanks for help

Hey,
When using scriptaculous to drag a div, how can I make it show me or alert me the x and y co-ordinates when finished?
Thanks for help
HTML Code:new Draggable('DIVNAME',{onEnd:function(){ var x = document.getElementById('DIVNAME').style.left; var y = document.getElementById('DIVNAME').style.top; alert('X='+x+' Y='+y); }, revert:false });
Try that.
Want to hide these adverts? Register an account for free!