/    Sign up×
Community /Pin to ProfileBookmark

Event that will fire upon end of user input?

Is there any event that will fire off when the user has done typing within an input text box? I tried settimeout() but not cutting it. I am trying to execute a method after the user has stopped typing. Any ideas on how to look for? ?

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@Logic_AliMay 10.2007 — Is there any event that will fire off when the user has done typing within an input text box? I tried settimeout() but not cutting it. I am trying to execute a method after the user has stopped typing. Any ideas on how to look for? ?[/quote]Stopped typing because they have consciously finished their input but not bothered to confirm this in the usual way, or for any other of a myriad reasons?

The latter could be handled with a timer set to an arbitrary value; the former requires a hardware peripheral interface to the user's brain (availability suspect).
Copy linkTweet thisAlerts:
@vicpal25authorMay 10.2007 — Lets say the user is searching for a product on "keypress" event, the user inputs three characters "abc", then on a minimum pause after done typing the three characters I want my method to be fired. I don't want it to be fired on "a", "b", "c" press... so to answer your question, yes when the user has deliberately has done typing.
Copy linkTweet thisAlerts:
@Logic_AliMay 10.2007 — Lets say the user is searching for a product on "keypress" event, the user inputs three characters "abc", then on a minimum pause after done typing the three characters I want my method to be fired. I don't want it to be fired on "a", "b", "c" press... so to answer your question, yes when the user has deliberately has done typing.[/quote]So presumably you mean to detect when they have typed one or more of a range of expected inputs? That's easily done, but you need to be careful not to take any un-intuitive action.
Copy linkTweet thisAlerts:
@vicpal25authorMay 10.2007 — No, I want to fire the event when the user pauses on input. The reason why I am using this is because I don't want this event (an ajax callback) to be fired the X amount of characters that they have typed. I want this even to be fired when the user has typed a set of characters (1 or 100) and has come to a pause.
Copy linkTweet thisAlerts:
@smeezekittyMay 11.2007 — onchange to start a timer when no change has ecurred for 5 seconds activate it
Copy linkTweet thisAlerts:
@Logic_AliMay 11.2007 — onchange to start a timer when no change has ecurred for 5 seconds activate it[/QUOTE]You won't get that event until the field loses focus. It's more a matter of resetting a timeout whenever a key is pressed, and taking action if it expires with the field still focused.
×

Success!

Help @vicpal25 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.10,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...