Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q902 Is there anyway were both Netscape Navigator 4 and Internet Explorer 4 can send the user to a specified page from the back button in the browser and not the previous history of the back button?

You are here: irt.org | FAQ | JavaScript | History | Q902 [ previous next ]

JavaScript 1.2 allows a partial string to be specified as a parameter in the history objects back method, which will go back to the last url loaded which contains the partial string:

<script language="JavaScript1.2"><!--
history.back('irt.org');
//--></script>

Which would go back to the last entry in the history object that contains irt.org.

You can provide your own back button:

<script language="JavaScript"><!--
function myBack() {
    history.go(-1);
}
//--></script>

<script language="JavaScript1.2"><!--
function myBack() {
    history.back('irt.org');
}
//--></script>

<form>
<input type="button" value="back" onClick="myBack()">
</form>

Apparently, none of this works in Internet Explorer 4.

Feedback on 'Q902 Is there anyway were both Netscape Navigator 4 and Internet Explorer 4 can send the user to a specified page from the back button in the browser and not the previous history of the back button?'

©2018 Martin Webb