This is correct. Barcode scanners emulate keyboards, so each number/char entered is a 'keypress' - usually followed by a carriage return (this is often changeable in the scanner units configuration) when the code has finished read.
This allows you to write javascript to suit the behaviour you require. If you're using a form with multiple fields, and have the carriage return setting on your scanner, I would recommend disabling the 'submit on enter' action and rebind the submit to a specified element (button/image) only. This will prevent the scanner triggering a submit prematurely. ~ C From: [email protected] [mailto:[email protected]] On Behalf Of Olwen Williams Sent: Monday, 4 October 2010 1:32 p.m. To: [email protected] Subject: Re: [phpug] [OT] - USB Barcode Scanner to Web As far as I know most barcode scanners look like keyboards. No personal experience, but that's what I've gathered. On Mon, Oct 4, 2010 at 12:45 PM, Aaron Cooper <[email protected]<mailto:[email protected]>> wrote: Has anyone had any experience with getting USB devices to execute events on web pages? (Webcam would be an example) We have a central application and hardware that we want to enhance with a USB barcode scanner. A global design goal is for the application to post data to a new page as soon as a scan is performed, without user action. Javascript and hidden fields have their limitation in this respect, so I am thinking along the lines of ActiveX here. Just wanted to see if anyone here has done something similar. Cheers Aaron -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected]<mailto:[email protected]> To unsubscribe, send email to [email protected]<mailto:nzphpug%[email protected]> -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected] -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected]
