Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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?

irt.org | Knowledge Base | JavaScript | History | Q902 [ previous next ]

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?

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.