OT: Using Javascript to disable backspace key with exception

2002-11-08 Thread James Taavon
I am using Javascript to disable backspace key. It works fine. The only problem is that I need to have the backspace key functional for only one field on my form. Here is the current script I am using: - script function checkShortcut() {

Re: OT: Using Javascript to disable backspace key with exception

2002-11-08 Thread Robert Polickoski
event.fromElement wiil give you the object which generated the event. Test for that being the input you want to allow backspace in and block it in all other cases. Robert J. Polickoski Senior Programmer, ISRD Inc. (540) 842-6339 [EMAIL PROTECTED] AIM - RobertJFP -- Original Message

Re: OT: Using Javascript to disable backspace key with exception

2002-11-08 Thread jon hall
You are calling this function onKeyDown right? Just leave the function call out on the textarea you don't want to trap the backspace key on. Also event.which is NS4's version of event.keyCode. If you do a little object detection you can make this script work cross browser... if (document.all)