Open jakfarza opened 6 years ago
You need something like this in your html inputs that need to be writable.
onfocus="disableReader();"
onblur="enableReader();"
And then this in a JS script tag (replace rfidscan to whatever you've named the object). You could also add these functions via jQuery of course. You need the boolean to prevent any funky double enabling etc.
readerIsActive = true;
function disableReader()
{
if (readerIsActive)
{
if ($.rfidscan) $.rfidscan('disable');
readerIsActive = false;
}
}
function enableReader()
{
if (!readerIsActive)
{
if ($.rfidscan) $.rfidscan('enable');
readerIsActive = true;
}
}
i use jquery.rfid, but other textfield disabled or cannot type text, how to solve that problem. first text field for rfid scanner, and other textfield for input text by typing.