E
E
Evgeny Lavrentiev2014-04-25 21:39:24
JavaScript
Evgeny Lavrentiev, 2014-04-25 21:39:24

How to track the operation of a USB barcode scanner using Jquery?

Good evening, dear users! I would like to hear a possible solution to one simple problem. There is a barcode scanner that works like a USB keyboard. It is required in a small web panel so that by means of Jquery, when the button is pressed, the input of data read from the barcode is expected.

There is no particular problem, I thought to do this:
1) make an input by mask for input and pass it to the form at the end
2) if there is no input for the nth time, then reset the wait and close the modal window of waiting for reading.

But I ran into the following problem, it turned out that the mask cannot be used, because. the number of characters may differ, which is very upsetting.

The question is, in fact, the following: how can you track the barcode reading so that after reading it immediately closes the modal window and passes the data to the search form?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
svd71, 2014-04-25
@lavrentiev

on the local machine - in any way. This requires access to the resources of the computer (more precisely, to the com-port created by USB), which is blocked by the virtual machine. That is, the computer with the scanner must have server capabilities to transfer data from COM to the client.
Saw implementation on ActiveX of such circuit.
But any home-grown service (in Java, for example) can come up to throw it out of the COM port to the client who has contacted via the network TCP port.

R
Rsa97, 2014-04-25
@Rsa97

Honeywell scanners can be configured to add a suffix, such as CR, to the read code, which is equivalent to pressing Enter.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question