qr code js html custom code

Confluence User - 04 Aug, 2024

<style type="text/css">
    #container{
        width: 200px;
        height: 200px;
        display: none;
    }
</style>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-qrcode/1.0/jquery.qrcode.min.js"></script>

<script type="text/javascript">

$(function(){
    var id = "#form.message.id#";
    if( !id.startsWith("#") ){
        $("#container").show();
        var qrcode = new QRCode({
          content: id,
          container: "svg-viewbox", //Responsive use
          join: true //Crisp rendering and 4-5x reduced file size
        });
        var svg = qrcode.svg();
        document.getElementById("container").innerHTML = svg;
        document.getElementById("containerExplain").innerHTML = "Scan this QR Code with the scanner menu";    
    }
});
</script>
<div id="containerExplain"></div>
<div id="container"></div>


this code should build a qr code when i submit the form but it is not work, where is the problem ? is there somethinf wrong with <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-qrcode/1.0/jquery.qrcode.min.js"></script> ??

note: i work on http://localhost:8080/jw/home (downloaded joget windows)

js;qr

2


05 Aug, 2024
confluenceUser
1
confluenceUser

Hello, 

the src="https://cdnjs.cloudflare.com/ajax/libs/jquery-qrcode/1.0/jquery.qrcode.min.js"is not accessible.

Please use another library or might as well just stick with the original code of calling QR code library from that has been added in the app that you are using . Navigate to Resources.

 

05 Aug, 2024
confluenceUser
confluenceUser

Thank you so much 

i hope for you the best

it is working now 

thanks 

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print