I have a problem with my Function. Once i print a page from XMLHttpRequest from the php side server with a unique link it doesnt recognize the scripts that are in the page at the php side server. it says undefined Functions in Jquery.
Thank you.
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) {
var iDiv = document.createElement('div');
iDiv.id = '22';
iDiv.className = '2323';
iDiv.innerHTML = xmlhttp.responseText;
iDiv.innerHTML += '<script type=\"text/javascript\" src=\"https://d3v2hnl706774i.cloudfront.net/html/iframeResizer.min.js\"></script>';
iDiv.innerHTML += '<script type=\"text/javascript\">iFrameResize({log: false,enablePublicMethods: true,enableInPageLinks: true,minHeight: 300});</script>';
document.getElementsByTagName('body')[0].appendChild(iDiv);
thisScriptElement.parentNode.insertBefore(iDiv, thisScriptElement);
thisScriptElement.parentNode.removeChild(thisScriptElement);
}
}
xmlhttp.open("GET", theUrl, true);
xmlhttp.send(null);
}