function createAr(sceneId) { //Create the ar viewer const arElement = document.createElement("holonext-viewer"); //Set the sceneID arElement.setAttribute('sceneId', sceneId); // add the newly created element and its content into the DOM const currentDiv = document.getElementById("clickshow"); currentDiv.appendChild(arElement); //Load the JS files to load the content var script = document.createElement('script'); script.setAttribute('type', 'text/javascript'); script.setAttribute('src', 'https://holonext.azurewebsites.net/public/js/hn-sdk-embed-beko-uk.js'); document.head.appendChild(script); }