qr code js html custom code
<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)