[thelist] removing yourself from the history list?

James Aylard evolt at equilon-mrc.com
Tue Mar 20 13:53:20 CST 2001


Fortune,

> so we need the page to remove itself from the history list when it loads
> itself into the frameset so that the back button will take you back to the
> search list!

    Assuming that you are setting window.location.href in your self-test
script, use window.location.replace() instead, e.g.:

<script language="javascript1.1">
  <!--
    // this replaces the current page in the browser's history
    // with the new page
    if (window.self == window.top) {
      window.location.replace("frameset.asp?pg=thispage") ;
    }
  // -->
</script>
<script language="javascript">
  <!--
    // in case we're dealing with a first-generation
    // javascript-enabled browser, which doesn't
    // understand the replace() method
    if (window.self == window.top) {
      window.location.href = "frameset.asp?pg=thispage" ;
    }
  // -->
</script>

James Aylard






More information about the thelist mailing list