Problem with back button.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anis2007
    New Member
    • Oct 2006
    • 21

    Problem with back button.

    Hi to all of you,

    When we back, then not go previous page
    What this wrong with this coade, plz help me.
    onclick="Javasc ript: history.go(-1);"
    OR
    onclick="Javasc ript: history.back(); "

    thankyou

    Records
    Anis Ahmad
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by anis2007
    Hi to all of you,

    When we back, then not go previous page
    What this wrong with this coade, plz help me.
    onclick="Javasc ript: history.go(-1);"
    OR
    onclick="Javasc ript: history.back(); "

    thankyou

    Records
    Anis Ahmad
    Use history.back();

    Comment

    • anis2007
      New Member
      • Oct 2006
      • 21

      #3
      Back Button.....

      Hi to all of you,

      what is wrong with thi code, when we back previous page then its not go.
      code is

      onclick="histor y.back();"
      OR
      onclick="javasc ript: history.back(); "
      OR
      onclick="javasc ript: history.go(-1);"
      OR
      onclick="histor y.go(-1);"

      like:
      <input type="image" src="images/back.gif" name="back" onclick="javasc ript: history.go(-1);">

      we use all above code.
      plz tell me.

      Thankyou.

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by anis2007
        Hi to all of you,

        what is wrong with thi code, when we back previous page then its not go.
        code is

        onclick="histor y.back();"
        OR
        onclick="javasc ript: history.back(); "
        OR
        onclick="javasc ript: history.go(-1);"
        OR
        onclick="histor y.go(-1);"

        like:
        <input type="image" src="images/back.gif" name="back" onclick="javasc ript: history.go(-1);">

        we use all above code.
        plz tell me.

        Thankyou.
        No need to create multiple threads for the same question
        use onclick="histor y.back();"

        Comment

        • ronverdonk
          Recognized Expert Specialist
          • Jul 2006
          • 4259

          #5
          DO NOT DOUBLE POST!!!
          IT IS ANTI SOCIAL BEHAVIOUR AMD COULD RESULT IN NOBODY READING YOUR THREADS ANYMORE!!

          Ronald :cool:

          Comment

          • ronverdonk
            Recognized Expert Specialist
            • Jul 2006
            • 4259

            #6
            DO NOT DOUBLE POST!!!
            IT IS ANTI SOCIAL BEHAVIOUR AMD COULD RESULT IN NOBODY READING YOUR THREADS ANYMORE!!

            Ronald :cool:

            Comment

            • monamac
              New Member
              • Oct 2006
              • 12

              #7
              i have had this problem with IE. if you are still having this problem, it could be because the form is trying to submit when you click on your button. image type input is handled the same as a submit button in IE. try doing something like:

              <a href="javascrip t:history.back( );"><img src="images/back.gif"></a>

              or even put do an onclick in the <a> tag.

              hope this helps.

              Comment

              • anis2007
                New Member
                • Oct 2006
                • 21

                #8
                Thanks to all of you.
                regards
                anu2007

                Comment

                Working...