Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onkeyup event need delay

Status
Not open for further replies.

CassidyHunt

IS-IT--Management
Jan 7, 2004
688
US
I have a script that fires off of the onkeyup event. It functions perfectly for hte calculation. The problem comes with a user needs to type more than one key. Is there way to pause and make sure the user is done entering data before it fires off the onkeyup event?

 
Use the onblur event handler so the calculations are done after the text box loses focus, which will mean the user is done entering data.

Lee
 
That was what I started to use and found out I need to do it when they finish typing and that it doesnt' mean they click somewhere else.

I was thinking maybe of putting a timer to handle the formatting and reset it each time the user presses the key. When the timer expires it would handle the formatting and calculations. I don't know how to use timers yet or if that would even work.

Thanks for the response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top