Thanks James, Again, I am well aware it is no different from a keyboard.
Noone's really reading the primary gotcha of my post so I'll just close this one now. Cheers people Aaron ----- Original Message ----- From: James McGlinn To: [email protected] Sent: Monday, October 04, 2010 3:00 PM Subject: Re: [phpug] [OT] - USB Barcode Scanner to Web Many of the promoters using Eventfinder for ticketing use our web-based ticket validation system at http://pro.eventfinder.co.nz. They plug in a USB scanner, and scan ticket barcodes directly into the web application. Javascript detects the characters typed, handles changing focus amongst the fields as needed, and finally submits the code via Ajax and updates the parts of the screen required to provide feedback to the operator. It's straightforward - as Olwen pointed out the device just sends characters into the input buffer exactly like a keyboard. Kind regards, James McGlinn __________________________________ CTO Eventfinder Limited Suite 106, Heards Building 2 Ruskin Street, Parnell, Auckland 1052 Phone: +649 365 2342 Mobile: +6421 633 234 [email protected] | www.eventfinder.co.nz On 4/10/2010, at 1:51 PM, Cliff Black wrote: 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]> 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] 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] -- 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] -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected]
<<eventfinder.png>>
