Created
March 22, 2022 12:47
-
-
Save zuzannamj/9a149a23d974af85ceb8a1ee1e03d861 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript" src="https://xxxxx/qrcode.js"></script> | |
</head> | |
<body> | |
%%[ | |
set @data = 'http://sfmarketing.cloud/' | |
]%% | |
<div id="qrcode" style="width:300px; height:300px;"></div> | |
<span id="code"></span> | |
<script type="text/javascript"> | |
var qrcode = new QRCode(document.getElementById("qrcode"), { | |
width : 300, | |
height : 300 | |
}); | |
function makeCode () { | |
var elText = "%%=v(@data)=%%"; | |
qrcode.makeCode(elText); | |
} | |
makeCode(); | |
setTimeout(function(){ | |
var imgsrc = document.getElementById("qrcodesrc").src; | |
document.getElementById("code").innerHTML = imgsrc; | |
}, 500); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment