473,378 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

OnInteractiveChange?


How could I trigger a javascript function everytime I change a character
in a textbox?
--
iTech Consulting Services Limited
Expert of ePOS solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Apr 16 '07 #1
3 1120
Man-wai Chang wrote:
>
How could I trigger a javascript function everytime I change a character
in a textbox?

The real problem is onchange() was not fired until I tab out of the
textbox. I suppose OnChange should fire everything I hit a key while a
textbox is in focus...

--
iTech Consulting Services Limited
Expert of ePOS solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Apr 16 '07 #2
Man-wai Chang said the following on 4/15/2007 10:42 PM:
Man-wai Chang wrote:
>>
How could I trigger a javascript function everytime I change a
character in a textbox?

The real problem is onchange() was not fired until I tab out of the
textbox. I suppose OnChange should fire everything I hit a key while a
textbox is in focus...
The onchange event only fires after the element loses focus *and* the
value has changed. What you are looking for is onkeydown, onkeyup,
onkeypress, or a combination of them.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 16 '07 #3
The onchange event only fires after the element loses focus *and* the
value has changed. What you are looking for is onkeydown, onkeyup,
onkeypress, or a combination of them.
OnKeyUp is the god ....

--
iTech Consulting Services Limited
Expert of ePOS solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Apr 16 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.