rush2amit007 / jquery-barcodelistener

Automatically exported from code.google.com/p/jquery-barcodelistener
0 stars 0 forks source link

Code does not work. #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I added the following code on my screen. But when I scan a barcode nothing 
happens.   
<script type="text/javascript" src='<% =ResolveUrl
("~/javascript/jquery.js") %>'> </script> 
<script type="text/javascript" src='<% =ResolveUrl
("~/javascript/barcodelistener.js") %>'></script>
<script type="text/javascript"> 
    $(document).ready(function() { 
        char0 = new Array("§", "32"); 
        char1 = new Array("˜", "732"); 
        characters = new Array(char0, char1); 
        $(document).BarcodeListener(characters, function(code) { 
            // YOUR FUNCTION HERE 
            // for example:
            debugger 
            alert(code); 
        }); 
    }); 
</script>

Original issue reported on code.google.com by niles...@gmail.com on 21 Apr 2010 at 12:46

GoogleCodeExporter commented 9 years ago
Please can you clarify the following points
I tried this on a test page. 
A textbox appears, On scanning the first time the focus is set to the textbox.
An only on scanning the second time does the string gets copied to the textbox.
Is this supposed to work this way ?
Is there a way we can get the barcode data without showing the textbox ?

regards

Original comment by niles...@gmail.com on 21 Apr 2010 at 2:29

GoogleCodeExporter commented 9 years ago
I've been able to take this code and add it to my existing site without any
modifications.  I would recommend setting the default focus on your page using
something like this jQuery script: 

<script type="text/javascript">
$(document).ready(function() {
    $("#textbox").focus();
});
</script>

Without seeing your code it's difficult to determine where your problem lies, 
exactly.

Original comment by mancini...@gmail.com on 26 May 2010 at 2:51

GoogleCodeExporter commented 9 years ago
I just want to read the barcode numbers from the scanner.Is it possible ?

Original comment by bles...@gmail.com on 4 Jan 2012 at 5:17

GoogleCodeExporter commented 9 years ago
is this possible? Maby to send it to a hidden input field? via JS script 
document.getelementbyid.vale = '';?

Original comment by simone.k...@gmail.com on 26 Jun 2014 at 8:46