Problem with 'window.location.replace("file.htm")'

Discussion in 'Javascript' started by Norman Swartz, Oct 13, 2006.

  1. Script works in Firefox but not in IE.

    Here's what I want to do:

    file1.htm loads file2.htm
    file2.htm loads file3.htm
    The "Back" tab in file3.htm returns the user to file1.htm

    A number of Web sites offer the following bit of coding to do what I
    want. I have used this coding in file2.htm (to load file3.htm).

    <script language="javascript1.1">
    <!--
    function leapfrog()
    {
    window.location.replace("file3.htm") ;
    }
    // -->
    </script>
    :
    :
    <a href="javascript:leapfrog()"><b>Continue</b></a>

    In Firefox, this coding works exactly as I want. But in IE, when one
    clicks on the "Back" tab in file3.htm, one is returned to file2.htm
    instead of file1.htm. What changes are needed so that the code works as
    I want in both IE and Firefox? Thanks.
     
    Norman Swartz, Oct 13, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bernd Liebermann
    Replies:
    3
    Views:
    165
    Erwin Moller
    Feb 11, 2004
  2. Frances Del Rio

    window.location -- in a blank window....

    Frances Del Rio, Jul 22, 2004, in forum: Javascript
    Replies:
    12
    Views:
    806
    Grant Wagner
    Jul 26, 2004
  3. saiho.yuen
    Replies:
    3
    Views:
    472
    kaeli
    Sep 14, 2004
  4. hzgt9b
    Replies:
    3
    Views:
    284
    David Mark
    Feb 14, 2008
  5. Ido

    Log window.location.replace

    Ido, Apr 6, 2009, in forum: Javascript
    Replies:
    1
    Views:
    140
    Thomas 'PointedEars' Lahn
    Apr 7, 2009
Loading...

Share This Page