//DialogScript.php For Dynamic Javascript For Dialog Widgets
var base_url="https://myedgeapp.com/public";
if (window.XMLHttpRequest){
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else{
// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function(){
if (xmlhttp.readyState==4 && xmlhttp.status==200){
document.getElementById("loadDialog").innerHTML= xmlhttp.responseText;
// loads scripts one-by-one using recursion returns jQuery.Deferred //
function loadScripts(scripts){
var deferred = jQuery.Deferred();
function loadScript(i) {
if (i < scripts.length) {
jQuery.ajax({
url: "https://myedgeapp.com/public/js/"+scripts[i],
dataType: "script",
cache: true,
success: function() { loadScript(i + 1); }
});
} else {
deferred.resolve();
}
}
loadScript(0);
return deferred;
}
var scripts = loadScripts([
"bootstrap.min.js",
]).done(function(){
// all scripts loaded
});
// trigger a callback when all queues are complete
jQuery.when(scripts).done(function() {
// scripts queue loaded
});
}
}
xmlhttp.open("GET", "https://myedgeapp.com/public/chat/ai/select/marketer/1696", false);
xmlhttp.send();