Skip to content
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

Uncaught ReferenceError: qrcode is not defined #36

Open
salbiz opened this issue Apr 12, 2016 · 2 comments
Open

Uncaught ReferenceError: qrcode is not defined #36

salbiz opened this issue Apr 12, 2016 · 2 comments

Comments

@salbiz
Copy link

salbiz commented Apr 12, 2016

Uncaught ReferenceError: qrcode is not defined

@kchasiotis
Copy link

kchasiotis commented May 6, 2016

I get the same error, here is my code

<html>
<head>
    <title>Title of the document</title>
    <script
            src="https://code.jquery.com/jquery-2.2.3.min.js"
            integrity="sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo="
            crossorigin="anonymous"></script>
    <script src="./html5-qrcode-master/lib/html5-qrcode.min.js"></script>
</head>

<body>
<div id="reader" style="width:300px;height:250px"></div>
<script>
    $('#reader').html5_qrcode(function (data) {
                // do something when code is read
                alert(data);
            },
            function (error) {
                //show read errors
            }, function (videoError) {
                //the video stream could be opened
            }
    );</script>
</body>

</html> 

Edit:

Based on a previous issue you just include those scripts in that specific order. Sadly the instruction is missing from the readme.md

 <script src="html5-qrcode-master/lib/jsqrcode-combined.min.js"></script>
 <script src="html5-qrcode-master/lib/html5-qrcode.min.js"></script>

@AjayPoshak
Copy link

AjayPoshak commented Dec 12, 2016

Yeah, I also had the same issue. Thanks to you, its been resolved now.
I think they should include it in readme also.

Hey @dwa012 , please add this in readme or grant me the collaborator access so that I can do it and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants