QR CODE Generator

Hi im using this code to generate dynamically a Qr code: https://codepen.io/davidshimjs/pen/NdBYrg

I found this here: Got a few questions on qrcodes , scanning of qrcodes and photos

So my problem is that i cannot pass a dynamic value through the java script, i tryed using the function dmx.parse like as i read it here: https://docs.wappler.io/t/using-app-connect-with-javascript-functions/15765

Here is my code:

qrcode.php

<dmx-value id="var2" dmx-bind:value="'www.google.com'"></dmx-value>

<script src='https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js'></script><script  src="js/qr.js"></script>

qr.js

var qrcode = new QRCode("qrcode");


function makeCode () {		
	var elText = dmx.parse('var2.value');
	
	if (!elText.value) {
		alert("Input a text");
		elText.focus();
		return;
	}
	
	qrcode.makeCode(elText.value);
}

makeCode();

$("#text").
	on("blur", function () {
		makeCode();
	}).
	on("keydown", function (e) {
		if (e.keyCode == 13) {
			makeCode();
		}
	});

I would appreciate any help you can give me. Thanks in advance.

Community Page
Last updated: