1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

JavaScript Div position

Discussion in 'Web Development' started by rmmuthaiya, Jan 8, 2009.

  1. rmmuthaiya

    rmmuthaiya New Member

    I have a div in my aspx page.Inside the div user will able to add some rows.While user add some rows it will get saved in sql.after added in database, the page will get freshly loaded from the server.when page is loading i need the div position at where the user added the row.
     
  2. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    why would you need a div position when your page is still there?
    use in your code the Response.Write command to ouput to the screen the responce back from the server.
     
  3. Osman

    Osman Member

    can't you update the items necessary on the page without reloading the entire page?

    or if the positioning is so important, give the div an ID and save the position of the div in your database too, then next time you can read the position from the database.

    for example

    <div id="usersRows"> .... </div>

    when the user Saves the information, do something like this:
    var divPosX = document.getElementById('usersRows').style.PosX;
    var divPosY = document.getElementById('usersRows').style.PosY;
    (i can't remember exactly how its done, but its possible)