Javascript: Do processing when user has stopped typing

Posted by Midhat on Stack Overflow See other posts from Stack Overflow or by Midhat
Published on 2010-03-21T18:34:49Z Indexed on 2010/03/21 18:41 UTC
Read the original article Hit count: 354

Filed under:
|

I have a text box on a web page, whose value I want to send to a XMLHttpRequest. Now I want the user to just type the value, without pressing a button. But If i just send the request int he keyboard events, it will fire every time a key is pressed.

So basically I want something liek this

function KeyUpEvent() { if (user is still typing) return; else do processing }

It would be great if the solution could come from plain javascript or mootools. I dont want to use any other library.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about mootools