1
0
-1

<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)

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      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.

       

      1. nihal sabbarini

        Thank you so much 

        i hope for you the best

        it is working now 

        thanks 

      CommentAdd your comment...