p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_howto thread: How to prevent the user from using BACK and FORWARD button


Message #1 by "Tom Xu" <comelite@h...> on Mon, 20 Mar 2000 17:34:17
Tom:  Try opening a new window without loading the navigation headers of the
browser.  The following code works with IE and Netscape.

<A HREF="current_page.htm"
ONCLICK="window.open('page_to_load.htm', 'title', config='height=500,
width=640,scrollbars=1')">Link Text</A>

Good luck.


-----Original Message-----
From: Tom Xu 
Sent: Monday, March 20, 2000 5:34 PM
To: How To
Subject: [proasp_howto] How to prevent the user from using BACK and
FORWARD button


I am currently develop an active server page, I want to forbidden the user
use the BACK and FORWORD button on the browser toolbar(or even the same
option in the context menu). In case that the user uses them, I am willing
to display a warning message then let the page stay unchanged. It seems the
window onbeforeunload and onunload can not meet my requirement.

Thanks for your help in advance!

Tom





  Return to Index