Welcome to WebmasterWorld Guest from 54.163.23.73

Forum Moderators: phranque

Message Too Old, No Replies

Barcode Scanner and Web Form Submit

using barcode scanner to fill webform and submit

     

brainstormer

8:06 am on Dec 11, 2009 (gmt 0)

10+ Year Member



I have a barcode scanner that is configured to work with a order management system that when scanning a barcode will add ~~~0000 to the front and / to the end of the number.

I have a webform that we use to look up customer orders, product inventory. What I'd like to do is to be able to scan the order number into the form field and it will submit automatically but right now, when we scan a order number 12345 it will give ~~~00012345/

Is there a way to strip away the ~~~, leading 0's, and / and only submit 12345 and add a <enter> to automatically submit the form?

Please advise,

Joe

ogletree

5:45 am on Dec 16, 2009 (gmt 0)

WebmasterWorld Senior Member ogletree is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You could do that with javascript. Have it strip away the numbers you don't want then have it submit form after it does the strip away.

txbakers

12:47 am on Jan 8, 2010 (gmt 0)

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Also, you can program the scanner to not add those characters. That sounds like a scanner programming problem.

You can also do it with a script using the onSubmit routine of the Form.
In javascript you can do a box.value = String(v).substr(7,100) which would start at the first real character.

damon_cool

7:22 pm on Mar 4, 2010 (gmt 0)

5+ Year Member



Either re-setup the barcode reader, or change it on the backend. I don't advise using javascript on the page.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month