i was trying to make an tester for a handler to open an app and if the app isnt there than open the download page but with the code i have it doesnt work exactly how i would like it mabye someone can help me in the right direction
<li onclick="openWebexContent()" class="li-slider">
<a class="btn-app">WBX</a>
</li>
function openWebexContent() {
var appURI = "webex:";
var fallbackURL = "https://webex.com/downloads.html";
var appOpened = false;
var iframe = document.createElement('iframe');
iframe.style.display = 'none';
iframe.src = appURI;
document.body.appendChild(iframe);
setTimeout(function () {
if (!appOpened) {
document.body.removeChild(iframe);
var downloadConfirmation = confirm("Webex kon niet worden geopend! Klik op OK om het te downloaden.");
if (downloadConfirmation) {
window.open(fallbackURL, '_blank');
} else {
alert("Er is iets fout gegaan");
}
}
}, 1000);
iframe.onload = function () {
appOpened = true;
};
}
New contributor
tvTriX is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1