02-06-2019 02:53 AM
Hello team,
I have a challenge with one of our projects, where we need to display the Guest associated MAC address in the form of a QR code. I added Support page to Guest AUP flow and I can see the associated Guest data there, but I failed to embed a proper JS, that reads the variable "MAC address" and converts it into a QR code picture and displays it on the Support page.
How can I get an example of this ?
Solved! Go to Solution.
02-06-2019 03:43 AM - edited 02-12-2019 07:59 AM
02-06-2019 03:43 AM - edited 02-12-2019 07:59 AM
02-06-2019 09:20 AM
Hy again Jason,
My code is pretty basic, embeds a .js function stored on ISE Custom repository, then calls a function to construct and display a QR code with the MAC address information of Guest user; The main issue I find now, is where I get the variable MAC address for each Guest session in ISE ? Now the QR code is using a static input to ensure that jscript is correct. The other issue is that ISE is parsing the script and moves <div> at the end of script and calls made in .js by ID no longer function.
<script type="text/javascript" src=":8443/qrcode.js"></script>
<div id="qrcode" style="width:100px; height:100px; margin-top:15px;"></div>
<script type="text/javascript">
var qrcode = new QRCode(document.getElementById("qrcode"), {
width : 100,
height : 100
});
function makeCode () {
qrcode.makeCode("00:40:FE:2A:49:E0");
}
makeCode();
</script>
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide