Announcement

Collapse
No announcement yet.

Returning to previous page (no not the old norton/zonealarm thing again)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Returning to previous page (no not the old norton/zonealarm thing again)

    How to I create a button to take the user back to the previous page?

    It needs to go between some !!<< >>!! so I can't use the NETQUOTEVAR:BACKLINK

    (I have some information pages that can be linked to from 2 different sources, and I want the user to be able to go back to the specific page they came from)
    John

    #2
    I tend to use

    <a href="javascript:history.go(-1)"><img src = "image.gif" width="n" height="n" border="0"></a>

    but this is JS so there may be a better way

    Comment


      #3
      took me ages to figure out why the stupid image wouldn't display... if anyone else is going to use this method in future, please note there should be an '=' sign after 'src'...
      John

      Comment


        #4
        Woops, Sorry!!

        must be something to do with the bang on my head...

        Comment


          #5
          no worries, keeps me on my toes...

          that was an easy one to fix compared to all the other problems...
          John

          Comment


            #6
            This method seems to work well, but in one circumstance it seems to fall over -

            When using <OL> </OL> lists it jumps back to the previous part of the existing page rather than the previous page.

            I didn't explain that very well... look here -

            www.zestra-for-women.co.uk/faq.html [WARNING:Adult content ]

            If you click a link from the top list it takes you to a 'label' point further down the page. using the javascript 'back' above just takes you back to the list at the top of the page.

            Is there another method that takes note of the last actual page, not the last 'link'?
            John

            Comment


              #7
              Technically the '#whatever' named anchor on the page is logged by the browser as a new URL - you'll find the 'Back' button on the browser works in the same way.

              I have no great suggestions other than on that page using a fixed URL for the 'Back' link rather than javascript.

              Comment


                #8
                or on that specific page, go (-2) in the js??
                Cheers!
                Marci - <a href="http://www.Over-Clock.co.uk" target="_blank">www.Over-Clock.co.uk</a>

                Comment


                  #9
                  that wouldn't work on this page, as there is a big list of questions they could click on, so no telling how many 'pages' it would need to go back...

                  but het, it's not like it's a complicated structure and it has big nav buttons a long the top. I just left the back button off this page altogether...
                  John

                  Comment


                    #10
                    You could load the page as a pop up and use a close button

                    Comment

                    Working...
                    X