I have one different challenge right now. I am working to design a web page where user can use scanning device to enter long serial number or they can do it manually by key board to enter values in JSP text boxes. I need to identify the input type(manual or scanner entry) for each such field and display with different styles on result page.
Can any one help me with this how we can do that? I have found one way to do it through java script. Writing a JS function on key press which will count and maintain the number of keys pressed. If count goes beyond the 17 digits its manual entry else scanner entry. But this idea do not sound that good as well as might not be the efficient way and my manager also did not like it. Can you suggest any other options or just modification to the idea I mentioned?
Thanks in Advance..!! I really appriciate if you can help me in my situation.!!
Why not just measure the time it takes to enter the code? If it's faster than a certain time (starting when the first digit was entered), it's from a scanner?