Closed Bug 275455 Opened 20 years ago Closed 20 years ago

window.history.go("PriorURLinHistory") does not work

Categories

(Firefox :: Bookmarks & History, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 168150

People

(Reporter: hala, Assigned: bugs)

References

()

Details

In IE and Netscape 4.X, I had some working javascript that executed
window.history.go("http://server.com/SomePriorPage.jsp");  This worked provided
one really has the URL argument in the browser's history.

This javascript function seems to do nothing in FireFox.  Why?
The phenomenon can be reproduced with three pages like the below named "1.asp",
"2.asp", and "3.asp" (or .jsp).  The "history go to" seems broken with FireFox
but works like a champ with IE.  Were certain features javascript not
implemented with FireFox.  Our users are complaining.  Thanks.

<!DOCTYPE HTML PUBLIC "//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
    <TITLE>Page 1</TITLE>
    <SCRIPT LANGUAGE="javascript">

    function newLoc()
        {
        alert("About to execute document.location = " +
document.forms[0].location.value );
        document.location = document.forms[0].location.value;
        }
    function goBack( )
        {
        alert("About to execute window.history.go(" +
document.forms[0].historygoto.value + ");" );
        alert("History size is " + window.history.length )
        window.history.go( document.forms[0].historygoto.value)
        }
    </script>
</HEAD>
<BODY >
<form>
    location =
    <input type="text" name="location">
    <input type="button" value="GO" onclick="newLoc()"
    <br>
    <bR>
    history go to:
    <input type="text" name="historygoto">
    <input type="button" value="GO" onclick="goBack()"
    <br>
    <bR>
</form>
</BODY>
</HTML>

*** This bug has been marked as a duplicate of 168150 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Component: History → Bookmarks & History
QA Contact: mozilla → bookmarks
You need to log in before you can comment on or make changes to this bug.