Basically what I'm doing is programming search functionality with AJAX in .Net (using Anthem) on a web application for our intranet. (So I'm sure it will work on the target audience
What I'd like it to do is behave like Spotlight in OS X. Searching and returning results from the server AS the user is typing into the field. I'm using the onKeyUp event and it's firing after every single keystroke. The problem is, that's too frequently. I don't want it searching for individual letters or half words. So if I can make it fire after x amount of milliseconds of inactivity it would be perfect.
I tried this, but the problem is that it waits and then fires all the keystroke events at once, resulting in the screen flashing real quick as it fires for each letter.
CODE
onKeyUp="setTimeout('this.blur(); this.focus()', 1250)"
And just so you know, the blur and focus methods are basically what make the .NET TextChanged event fire.
Any ideas?
