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 ---------------------------------- From: "James Taavon" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Fri, 8 Nov 2002 09:52:27 -0500 >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() >{ >if(event.keyCode==8 || event.keyCode==13) >{ >return false; >} >} ></script> > >----------------------------------------------------- > >How can I modify this script to include backspace for my one textbox? > > >Thanks in advance!! > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm