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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird behaviour scanning 2D barcode off driver license using SYMBOL

Status
Not open for further replies.

southbeach

Programmer
Jan 22, 2008
879
US
Hello!

For some time I have played with the idea of writing a PHP library to scan USA driver licenses using a standard 2D barcode scanner. Well, I finally bought a SYMBOL scanner and my enthusiasm was cut short when upon scanning my own driver license into a simple <textarea> box the browser went crazy and all sorts of things appeared to be happening ... well, not that many but a few. :)

It appears as if the scanning of the 2D code triggered hotkeys like executions and my browser started to open windows (I use Firefox).

If I scan the same into a windows text document I can see the data segment broken into lines as if there are NL/LF characters embedded within ... If I scan it within a notepad ++ document I get a long line ...

Now my question:
How does one capture the data scanned without triggering browsers' built in behavior nor submitting the form?

Thank you all in advance for your assistance!


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Sounds like a problem in the reader library. Perhaps it is not escaping tab characters. Which probably means it is not escaping other characters either.

But a workaround might be to attach a onsubmit action to the form tag that cancels submit if a checkbox is not set. Ugly but possibly easier than fixing the reader library
 
@jpadie, I was thinking alone the line of your suggestion but using JS to check each character and "hard code" what is or not CR vs LF or TAB ...

I hate hard coding anything but might be a, as you said, ugly but necessary solution!

Thanks,




--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top