-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiple scans, listbox trigger submit and trigger event to AJAX. #3
Comments
Hi Smartmeter, Thanks for your feedback. I will try to update the lib to work with latest version of JQuery. It would be helpful to know:
To answer your questions:
many scans should be possible, you just have to take care to cache each scan individually. There is also no need for form elements at all (only if you need them for fallback reasons, like keep your webapp available for users without a scanner):
So if you want to keep input fields just take care to catch every submit of the surrounding form element:
|
You have to use custom actions to handle this case: Or if it is a two steps procedure, you have to disable the first input field as soon as its filled by the bar code scanner. Then it will put the second scan it the second input and so on |
With custom actions, you can define certain patterns in your barcodes:
|
It only works with barcode scanners that produce character outputs. As a website can deal with any kind of character, this is how it works. Your barcode scanner knows the standard, this library just deals with the character output. |
Just use jquery for it: https://api.jquery.com/jquery.post/ |
By default it is auto-submitting the surrounding form element, as described here: https://github.com/pape-io/barcode-scanner.js#inputdata-barcode-scanner-target |
Hi Pape, thanks for taking the time, this is a very nice lib, after looking at other including others (quite a few https://github.com/lindell/JsBarcode https://github.com/serratus/quaggaJS ) I found yours to make most sense , easy for novice like me 👍 Thanks for the custom action, I will post the code, let me get it to a decent working and cleaned up point... embarrassed right now :) 1 My scanner is not pulling the P or Here he voiced some frustration and posted a sample, I thought from my search it would help your lib http://www.deadosaurus.com/detect-a-usb-barcode-scanner-with-javascript/ |
Hi, for me on disconnects
totally bombs out on me,would be supeer sweet, if this was an option |
hey saw this #3 Can this also scan characters, and which libs are supported. For e.g. if I have 2 types of codes Parts P0938823 and Fluids F0238847 would the scanner pick up the P and F I have both UPC and serial numbers on various commodities from the grocery store and hardware store, does this scan work with both? and will it tell me the correct type? |
@smartmeter: Tesseract has nothing to do with this library, it is also not integrated in barcode-scanner.js and to be honest, tesseract has nothing to do with pictures ;) |
So guys, appreciate all the questions, but I had to cleanup this issue. I moved all the question to separate issues: Github Issues Please try to open a new issue, for every new topic, question, as it helps me answering the questions and having an overview. It will also help others to find the right answers to similar questions. I also cleanup the README a little bit, maybe that helps understanding certain stuff. I will come up with a live demo, where you can test your scanners in the next days/weeks, so stay tuned. |
So here is the demo page: https://htmlpreview.github.io/?https://github.com/pape-io/barcode-scanner.js/blob/master/demo.html |
Hello, this is great little nugget, 👍 love the lib. I am trying to use it with my web app. (with the current version of Jquery it sometimes does not scan, can you please update).
`
$("input:first").focus()` 1. I have a scenario where the user may scan one, **or many scans** like a shopping cart, so I have put it in a `textbox` or `listbox` will the target work with a listbox. How can I achieve this where each item is separate. 2. If I have 2 input boxes, how does the scan know which one to put it in. 3. Can this also scan characters, and which libs are supported. For e.g. if I have 2 types of codes Parts `P0938823` and Fluids `F0238847` would the scanner pick up the P and F 4. how does it know which barcode standard to use. I mean is this a configuration in the lib or the scanner prefix codes. 5. how can I trigger an Ajax silent `POST` on every scan. is it possible? 6. Is this auto submitted when I hit scan? I do not see a submit, or is it a separate user action, where they click submit button.
thanks
The text was updated successfully, but these errors were encountered: