Navigation panel won't remember its position

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ridgedale
    New Member
    • Oct 2007
    • 27

    Navigation panel won't remember its position

    I have a test site setup at:



    and I am having trouble trying to resolve an issue relating to the scrolling navigation panel. When the user scrolls down the list and clicks on a link the new page is reloaded but the position in the navigation panel is forgotten and the content jumps to the top. :(

    Is there any way to resolve this? Any assistance would be appreciated.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    Originally posted by ridgedale
    404
    Originally posted by ridgedale
    clicks on a link the new page is reloaded but the position in the navigation panel is forgotten and the content jumps to the top.
    either it's a new page or it's reloaded...

    in HTML there is no way to tell the previous screen position (it's a browser courtesy) and new pages are always opened at the top (unless you tell it to jump to an anchor)

    Comment

    • ridgedale
      New Member
      • Oct 2007
      • 27

      #3
      Thanks for your reply, Dormlich. Apologies, I managed to post the link incorrectly. Hopefully it will make clearer what I mean?



      Thanks again

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        it makes the "problem" visible, still the explanation remains.

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Why don't you just load the content instead of the whole page when you click a link?

          Comment

          • ridgedale
            New Member
            • Oct 2007
            • 27

            #6
            Thanks for your feedback, guys. acoder, your suggestion sounds like it might work. Can you give me a pointer as to how I would do this?

            Thanks again.

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              You can either use (i)frames (easy, but ugly), or Ajax (a bit harder, but more elegant).

              Comment

              • ridgedale
                New Member
                • Oct 2007
                • 27

                #8
                I would like to steer clear of iframes, so how do I go about achieving this with Ajax?

                Thanks for your patience.

                Comment

                • ridgedale
                  New Member
                  • Oct 2007
                  • 27

                  #9
                  Just to update everyone here I received a javascript in the following post at the webmasterworld javascript forum that worked a treat:



                  Thanks again.

                  Comment

                  • acoder
                    Recognized Expert MVP
                    • Nov 2006
                    • 16032

                    #10
                    OK, I did think of suggesting just that, but I thought it'd be much better to avoid that and just load only the content required when that's the only difference from page to page.

                    Comment

                    Working...