Jump to content

How to get and manipulate the recent position of html-tables and divs?


Guest nickinami
 Share

Recommended Posts

Guest nickinami

Hi there,I am not experienced in JavaScript and these webscripting languages.That is why I hope that you can help me! :) I do have a script that allows me to make any table oder div draggable!Now it is my aim to save the recent position into a database to reload at any other time.Is there any posibility to achieve those goals?I tried to get the position like that

onclick="alert('Position Top='+document.getElementById('d3').offsetTop)

and

onclick="alert('Position Left='+document.getElementById('d1').offsetLeft)

The first one seems to work somehow, but the second one allways return the same value, what is that?How can give a value of an JavaScript-Variable to php(to write to the database, without everyone seeing the passwords and stuff)Thanks in advancenickinami

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...