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

Q529 How I can restrict the history of a window to one location?

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

Q529 How I can restrict the history of a window to one location?

Use:

<script language="JavaScript"><!--
function go(url) {
    if (document.images)
        location.replace(url);
    else
        location.href = url;
}
//--></script>

<a href="default.html" onClick="this.href='javascript:go(\'http://www.somewhere.com/default.html\')'">just go there</a>

Note: in Opera replace() will work, but only with absolute URL's.


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


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