how to jump to a spot on web page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dragon52
    New Member
    • Jun 2009
    • 72

    how to jump to a spot on web page

    Hi,

    When the user click a button on screen I display a table of info way down the page and I like to immediately jump to that section of the page, ie without the user having to scroll down to see the table.

    How do I do that? I know how to in the static way like a menu but not linking the jump to a button_click.

    Can anyone help??

    thanks
  • ThatThatGuy
    Recognized Expert Contributor
    • Jul 2009
    • 453

    #2
    i think youre talking about bookmarks....
    if youre doing it in pure html... then do this....

    place a link at the top of the page
    <a href="#infopart ">Jump to Info</a>

    where #infopart happens to the place where you require the user to jump...

    then put a <a> tag like this <a name="infopart" ></a> near to that table

    and it will work...
    Last edited by Frinavale; Jan 4 '10, 05:15 PM. Reason: Added closing double quote to <a href="#infopart">

    Comment

    • dragon52
      New Member
      • Jun 2009
      • 72

      #3
      Hey, ThatGuy, thanks for your reply.

      Isn't your suggestion the same as a static marker where the user click a visible link to jump to a specific spot on the page? Anyway I have tried your suggestion and no differences that I can see.

      May be I haven't explained my problem properly.

      I want the page to scroll/jump after the user clicked a button.

      I have 2 buttons. Depending on some options the user selected on the page, the buttons when clicked displays different info on different areas of the page.

      At the moment when the page refreshes it goes back to the top by default. Because I expect the user to try different options/param and click a button each time to display the new info I want the user to be able to see the updated info without having to laboriously scroll down the page each time.

      Any other suggestions??

      Thanks

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Try ThatThatGuy's suggestion again but use an HTML input type="Button" instead of an asp.net button.

        Or you can use an asp.net button but you'll have to have it "return false" during the client side "onclick" event so that it doesn't post back to the server.

        -Frinny

        Comment

        Working...