In netscape you will have explicitly capture the keydown event.
(window.captureEvents)
-----Original Message-----
From: John Arbon [mailto:subscriptions@c...]
Sent: Friday, July 12, 2002 7:46 AM
To: javascript
Subject: [javascript] Disabling ctrl keys in Netscape 6?
This is a script I have that works to disable the ctrl-c and ctrl-a keys
when used
in IE, BUT this script does not function as I had hoped in Netscape.
Here is the function:
function checkKP()
{
if(event.ctrlKey)
if((event.keyCode == 65) || (event.keyCode == 67) || (event.keyCode ==
97) || (event.keyCode == 99))
event.returnValue = false;
}
And the call to the function I have put in the <body> tag:
<body onkeydown='checkKP()'>
Can anyone enlighten me on how I need to write this script to work with
BOTH browser, or if I need to write one for each, how would you write one
for NN?
Thanks!
John
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************