Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts

    Question get TOP and LEFT OnMouseDown?

    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

  • #2
    Regular Coder
    Join Date
    Apr 2010
    Posts
    163
    Thanks
    3
    Thanked 25 Times in 25 Posts
    try
    Code:
    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

  • #3
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts
    thanks, but that didn't work?!

  • #4
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts
    I have just uploaded my latest version

  • #5
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts
    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?

  • #6
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts
    Please help me!!

  • #7
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts
    I have just noticed it populates the textboxes when I open and close firebug?!

  • #8
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts

    Question

    anyone ?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •