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

Q491 Is there any way of knowing the URL of the next document to be opened from within an onUnLoad event?

irt.org | Knowledge Base | JavaScript | Link | Q491 [ previous next ]

Q491 Is there any way of knowing the URL of the next document to be opened from within an onUnLoad event?

There is no way to trap the next location, unless you add an onClick event handler to each link to tell you what link was selected by the user:

<script language="JavaScript"><!--
var nextpage = '';
//--></script>

<body onUnload="alert(nextpage)">

<a href="http://www.irt.org/" onClick="nextpage=this.href">irt.org</a>

</body>

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.