I’m developing an application in that i need to capture user input from text box, if he stops typing for more than 3 sec. means we need to capture that text using javascript and need to store it in mysql db… plz help me out of this?
Thank you.....
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Attach events to the input (e.g. keyup, keydown, keypress). There you will set up a setTimeout with a callback. Of course the timeout ID will be stored in a var (e.g. window.type_timeout). The setTimeout callback will do what you want ater those 3 seconds of inactivity.
You can start here. E.g.(using jQuery):