SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru quenting's Avatar
    Join Date
    Dec 2002
    Location
    Switzerland
    Posts
    735
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    moving to a specific anchor on page

    Hello,
    I would like users to access a page and depending on some context variables to be moved to a certain anchor on the page.
    The anchor is decided on the server side so i cannot use the #anchorname in the incoming link.
    I tried :
    window.location.hash='anchorname'
    and it works, the only thing is that it is counted as a "click" in terms of browser history, and when the user hits back he does not go back to the previous page but goes to the top of this one.

    Is there anyway to have the window move to a specified anchor without it being considered as a new entry in browser history ?

    Cheers,
    Quentin
    The largest message boards on the web !
    unblog.fr, hosting 700000 french blogs

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ::: certified wild guess :::


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
  •