Web Analytics Made Easy -
StatCounter NS7 doesn't support.... - CodingForum

Announcement

Collapse
No announcement yet.

NS7 doesn't support....

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

  • NS7 doesn't support....

    Hi, I have facing some problem and found that NS7 doesn't support javascript:history.back() or javascript:history.go(-2)

    anyone can help me to solve it?
    many thanks.
    Last edited by suisui; Jul 11, 2002, 12:25 AM.

  • #2
    Hello,

    Well, I tested it on NS7 and it does work :
    Code:
    <script>
    document.write('<a href="#" onclick="history.go(-2)">Click</a>');
    </script>
    Well, if there is no page in the history, that's another thing

    Scripting | JavaScripts | PerlScripts | Python Scripts | Articles | My Journal

    Comment


    • #3
      Also, please refrain from pm-ing mods (ahem, me) for questions that can be asked in the forum. I read the forums too you know.
      jasonkarldavis.com

      Comment


      • #4
        premshree,
        no...
        It doesn't work....
        why?

        Comment


        • #5
          history.back()

          and

          history.go(-1)

          both work fine in all builds off the Mozilla 1.0 trunk. (Not to mention every single build of Gecko in existance - from what I can quickly tell in BugZilla).

          It is something *else* you are doing, care to post some code?
          jasonkarldavis.com

          Comment


          • #6
            Okay, here are the code:

            page 1

            <html>
            <head>
            <title>Untitled Document</title>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            </head>

            <body bgcolor="#FFFFFF" text="#000000">
            <a href="his_back.htm">link</a>
            </body>
            </html>

            ---------------------------------------------------
            page 2

            <HTML>
            <HEAD>
            <TITLE> New Document </TITLE>
            <script>
            document.write('<a href="#" onclick="history.go(-2)">Click</a>');
            </script>
            <BODY>


            </BODY>
            </HTML>

            thanks for helping

            Comment


            • #7
              you should have used history.go(-1), since you only need to go 1 (not 2) page back. Or simply history.back()

              Originally posted by suisui
              Okay, here are the code:

              page 1

              <html>
              <head>
              <title>Untitled Document</title>
              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
              </head>

              <body bgcolor="#FFFFFF" text="#000000">
              <a href="his_back.htm">link</a>
              </body>
              </html>

              ---------------------------------------------------
              page 2

              <HTML>
              <HEAD>
              <TITLE> New Document </TITLE>
              <script>
              document.write('<a href="#" onclick="history.go(-2)">Click</a>');
              </script>
              <BODY>


              </BODY>
              </HTML>

              thanks for helping
              Glenn
              vBulletin Mods That Rock!

              Comment


              • #8
                no...
                it doesn't work

                Comment


                • #9
                  ok, i saw what you were doing wrong. put the script inside the body tag. Anchor tag should be inside the body. And also you did not have the </head> tag.

                  page 2

                  <HTML>
                  <HEAD>
                  <TITLE> New Document </TITLE>
                  </HEAD>
                  <BODY>
                  <script>
                  document.write('<a href="#" onclick="history.go(-1)">Click</a>');
                  </script>
                  </BODY>
                  </HTML>
                  Glenn
                  vBulletin Mods That Rock!

                  Comment


                  • #10
                    no....
                    it doesn't go back to history page too...

                    Comment


                    • #11
                      did you copy & paste the code I made?
                      can you see the Back button enabled in the toolbar?
                      can you post the codes (again) you were executing.
                      Glenn
                      vBulletin Mods That Rock!

                      Comment


                      • #12
                        page 1

                        <html>
                        <head>
                        <title>Untitled Document</title>
                        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                        </head>

                        <body bgcolor="#FFFFFF" text="#000000">
                        <a href="his_back.htm">link</a>
                        </body>
                        </html>
                        ===============================

                        page 2

                        <HTML>
                        <HEAD>
                        <TITLE> New Document </TITLE>
                        </head>
                        <BODY>
                        <a href="javascript:history.back()">Back</a>
                        </BODY>
                        </HTML>


                        ==============================
                        thanks for helping.

                        suisui

                        Comment


                        • #13
                          Don't put the jabascript tag in there.... do what glenngv put like this

                          Page 2:

                          <HTML>
                          <HEAD>
                          <TITLE> New Document </TITLE>
                          </head>
                          <BODY>
                          <script>
                          document.write('<a href="#" onclick="history.back()">Back');
                          </script>
                          </BODY>
                          </HTML>

                          Comment


                          • #14
                            I'm using Netscape 7.0 Preview Release 1, duno why ... still can't work with history.back()...

                            Comment


                            • #15
                              I must really be out of it.. I forgot the </a>

                              Code:
                              <script> 
                              document.write('<a href="#" onclick="history.back()">Back</a>'); 
                              </script>

                              Comment

                              Working...
                              X