Jump to content

read value barcode from unihtmlframe unigui ?


soft4u

Recommended Posts

My Version is 1.90.0 build 1555

In property HTML of Unithmlframe I write:

 

Quote

<div id="qr-reader" style="width:500px"></div>
    <div id="qr-reader-results" style="width:100px" ></div>
<script src="html5-qrcode.min.js"></script>

<script>       
    
    function docReady(fn) {
        // see if DOM is already available
        if (document.readyState === "complete"
            || document.readyState === "interactive") {
            // call on next available tick
            setTimeout(fn, 1);
            
        } else {
            document.addEventListener("DOMContentLoaded", fn);
             
        }
    }

    docReady(function () {
        var resultContainer = document.getElementById('qr-reader-results');
      
        function onScanSuccess(decodedText, decodedResult) {
                alert(decodedText);    

        }
        

        var html5QrcodeScanner = new Html5QrcodeScanner("qr-reader", { fps: 10, qrbox: 250 });
        html5QrcodeScanner.render(onScanSuccess);
     
                   
    });
</script>

 

how I can read the 'decodedText' value from unigui  Mainform ?

Thank you verry much !

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...