Results 1 to 2 of 2

Thread: Refresh Page

  1. #1
    Join Date
    Oct 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Refresh Page

    I need to automatically refresh webpage every 10 seconds.

    However i want it to work like when pressing refresh button on IE, that is:

    If i am currently scrolled down to midddle or bottom of a long page when i refresh i want to remain at same possition. Unfortunately when using meta refresh or javascript location.reload, page returns to top.

    Does anyone know how to do this?

    James

  2. #2
    Join Date
    Jul 2006
    Posts
    497
    Thanks
    8
    Thanked 70 Times in 70 Posts

    Default

    Use JavaScript to store the scrollbars' positions (both horizontal and vertical) in a cookie before refreshing; if the cookie is set, put them at that position and unset the cookie in window.onload.
    -- Chris
    informal JavaScript student of Douglas Crockford
    I like wikis - a lot.

Bookmarks

Posting Permissions

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