Click here to Skip to main content
15,918,889 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
How can we set the time out property for a text box ?

The user need to enter his Id into a text box.I kept the focus on that text box by default in the page load event. How can I specify the user to enter his Id again If he cant enter the Id within specific time limit ?

Thanks,
Pradeep
Posted
Comments
Sergey Alexandrovich Kryukov 16-Jun-15 16:36pm    
It does not seem to make any sense. Even if you really some timeout, it cannot be "time out property for a text box"... :-)
What are you really trying to achieve, why?..
What's wrong with just using a timer?
...Bad idea anyway.
—SA
Member 10582228 17-Jun-15 8:20am    
Hi,
I just need to specify the time out for the text box. My actual purpose is:
I am designing a webpage for the employees to enter their suggestions. The first text box is for accepting the user Id. It should accept the Id only if the user scans his Id card, it shouldn't allow the user to type input into the text box.So I tried to find the time it taken to enter id into the text box if the employee scans his Id and set that time limit for the text box .
Thanks,
Pradeep
Sergey Alexandrovich Kryukov 17-Jun-15 8:37am    
Bad idea. Synchronize scanning with the Id input, don't use time.
Again, there is no such thing as "time out for the text box".
—SA
ZurdoDev 16-Jun-15 16:36pm    
Use setTimeout in JavaScript.
Sergey Alexandrovich Kryukov 16-Jun-15 16:39pm    
I cannot imagine the inquirer to get an idea. The rest of it is supposed to be more complicated than that. The timeout should be, say, between the document ready event and pressing some "Submit" button, because no typing in the text box can indicate that entering is complete. Bad idea, anyway...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900