Will this stop <alt><left-arrow> from going back?

-----Original Message-----
From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 2:27 AM
To: CF-Talk
Subject: RE: How to disable "Back" function on browser


> Is there a way to disable the "Back" function when the user right click
> the mouse?  What I am trying to do is to prevent the user from going
> back to the previous page.

You can trap the right-click event in JavaScript and do a pop-up, or just
not let it do anything

function stopClick(i)
{if (document.all)
 {if (event.button == 2)
  {alert("You can't RightClick here");
   return false;}}
 if (document.layers)
 {if (i.which == 3)
  {alert("You can't RightClick here");
   return false;}}}

if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);}
document.onmousedown=stopClick;

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to