[thelist] Prevent a request from redirecting browser....
Matt Warden
mwarden at gmail.com
Mon Mar 28 11:26:06 CST 2005
Hi Jay,
On Mon, 28 Mar 2005 07:32:09 -0600, Jay Blanchard
<jay.blanchard at niicommunications.com> wrote:
> Clicked link makes request to currently open browser window
> JavaScript pops-up a warning that when 'OK' is clicked a new browser
> window will be opened leaving the application browser window unscathed.
I think you want onunload:
http://www.codetoad.com/javascript/miscellaneous/onunload_event.asp
Basically, your window.onunload would return confirm('Really leave?');
The problem is that I don't believe you have access to information of
where the user's next page is, which might cause havoc in your
application (i.e., regardless of whether they are clicking a link YOU
provide them or if they are being redirected based on what you are
trying to prevent).
--
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com
This email proudly and graciously contributes to entropy.
More information about the thelist
mailing list