You have an answer, but I suggest you consider the problem domain before
solving in this manner. Most likely, you are either a) wanting to allow for
corrections or b) wanting to wait until the entire string is entered before
processing.
If a, your method might be the best, depending on what you are doing. If b,
you can process the portion that fits the keystroke and then capture the
blur event for the control to do complete processing. This will help you
avoid the wait two seconds.
I know nothing of your app, but I did a heavy JavaScript app years ago for
key entry (replace a windows app). If I would have waited two seconds, I
would have been hosed. Your app is, hopefully, completely different.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it:
http://gregorybeamer.spaces.live.com/
*************************************************
| Think outside the box!
|
*************************************************
"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:1A**********************************@microsof t.com...
hey all,
i have a key up javascript function where i want half the function to run
and then wait about 2 seconds, but if within that 2 seconds another key up
event has a occurred, i need it to cancel the initial call to the
function.
can someone please show me if this can be done.
thanks,
rodchar