|
-
Jul 10th, 2001, 09:48 AM
#1
Thread Starter
Hyperactive Member
How to read key Backspace
Is there a way to disable the Backspace? I am a simple
html and asp script, but there are fields that I would like to
disable. I looked at the Onkeypress but still did not give
me and/or work with the Backspace at all.
Thanks in advance for any help.
-
Jul 10th, 2001, 09:50 AM
#2
Frenzied Member
what exactly do you mean by disable field!!
-
Jul 10th, 2001, 09:55 AM
#3
Thread Starter
Hyperactive Member
What I am trying to say is that I do not want to the users to
edit a particular field on my html form. I was able to use the
following code to not allow the user to key in anything, except
for the Backspace key, ie. he could hilite the text and then
press the Backspace to wipe out the text in the text box.
Hope this helps.
HERE is the code:
onKeypress="if (event.keyCode > 0) event.returnValue = false;"
-
Jul 10th, 2001, 09:56 AM
#4
Frenzied Member
put your text field to readonly:
<input type="text" name="someName" readonly>
this will do
-
Jul 10th, 2001, 09:58 AM
#5
Thread Starter
Hyperactive Member
Thanks, Sebs
That is all I need. Appreciate your quick help.
Have a great day!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|