...

View Full Version : get TOP and LEFT OnMouseDown?



jarv
06-10-2010, 05:42 PM
on my page: http://www.jbiddulph.com/john-drag.html

I want to be able to show the TOP and LEFT position on the textboxes below when I move the box?!

Please help?!

thanks

J

gizmo1650
06-10-2010, 05:53 PM
try

function getvalues(){
document.getElementById('top').value=parseInt(document.getElementById('dd-demo-1').style.top)
document.getElementById('left').value=parseInt(document.getElementById('dd-demo-1').style.left)
}

you'll need to add the ids to the fields

jarv
06-10-2010, 06:00 PM
thanks, but that didn't work?!

jarv
06-10-2010, 06:01 PM
I have just uploaded my latest version

jarv
06-10-2010, 06:22 PM
it is sort of working, very slowly?!

if I move the box and wait or do something else on another page

and come back to it it will show teh correct TOP and LEFT?!

why is it so slow?

jarv
06-10-2010, 08:26 PM
Please help me!!

jarv
06-10-2010, 09:47 PM
I have just noticed it populates the textboxes when I open and close firebug?!

jarv
06-12-2010, 09:26 AM
anyone ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum