Forum Moderators: open

Message Too Old, No Replies

Bar Code Scan to Webform

         

homeless

7:07 pm on Jul 30, 2010 (gmt 0)

10+ Year Member



Hi,

I have a client that would like the ability to Scan a bar code into a form field and perform a table search when the scanner button is clicked.

Does AJAX have the ability to recognize this button click? Is it considered a keypress? I'm currently leaning toward onchange?

Also, he does not have a bar code scanner (yet) for me to work with. Are there some scanners that are better suited for this task.

Demaestro

7:15 pm on Jul 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Does AJAX have the ability to recognize this button click?


I would wager no.

Is there a reason you want this to be an html form?

Does he need to do this from multiple computers or just 1?

If it is only a couple computers that he will do this from, then I would write a program that runs client side and submits the data to a URL and opens the response in the default browser. That would be easier than hacking this to work with a browser.

homeless

7:38 pm on Jul 30, 2010 (gmt 0)

10+ Year Member



Yes. I figured it would be something that should be done in VB. Unfortunately, I don't know VB...just PHP and some AJAX.

What he wants is some sort of system that can.
1. store a bar code.

2. Scan a bar code and retrieve a product record. I have no idea why he would want to do this. I would think he would want to search on keywords.

3. Write bar codes from the UPC codes that are stored at a later time. Once again, I have no idea why he would want to do this either since he's scanning the codes off of the products.

Demaestro

10:22 pm on Jul 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I think you can compile PHP into a windows executable .exe

Scanner inputs are pretty basic, I bet you can find a library that will read the input. Then use something like curl for php to post the data as an html to the server and open the output in his default browser.

You should be able to pull it off with some reasearch, but my opinion is an executable on his machine is the best route.

Step 1 - get a scanner.
Step 2 - work on capturing scanner input with PHP
Step 3 - post the data in curl

Step 1 & 3 are going to be simple simple. Even step 2 shouldn't be that hard with the right lib.

txbakers

3:38 am on Aug 7, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A barcode reader/scanner does nothing more than read the barcode, translate it into English, enter it into the box, and press Enter, all at the same time.

There's no magic.

I recommend the Symbol LS2208 Laser scanner with our web applications. comes programmed and ready to go right out of the box.