|
-
Nov 14th, 2000, 11:16 AM
#1
Thread Starter
Addicted Member
Hi,
can someone let me know what event ( if any ) is fired when a user types something in a text box WITHOUT exiting the control. I don't think the answer is onChange, this requires exiting the control
"The onChange event handler executes JavaScript code when input focus exits the field after the user modifies its text. "
http://www.eborcom.com/webmaker/tuto....html#onChange
I want to flag a message if the cotents of a text box are changed without leaving the control, so if, for example a textbox contains the worg dog and I delete the g then the event would fire.
Thanks in advance.
Lenin.
-
Nov 14th, 2000, 01:40 PM
#2
You can try the onKeyDown event but I'm not sure how widely supported it is. It might only work in IE. Here's an example of how it can work:
Code:
<HTML>
<HEAD>
<TITLE>test.asp</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function echoIt()
{
parText.innerHTML = txtTest.value;
}
-->
</SCRIPT>
</HEAD>
<BODY>
<INPUT NAME="txtTest" ID="txtTest" SIZE=20 onKeyDown="echoIt()">
<P NAME="parText" ID="parText"></P>
</BODY>
</HTML>
Paul
-
Nov 15th, 2000, 04:26 AM
#3
Thread Starter
Addicted Member
Many thanks Paul. That did the trick.
Lenin
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
|