I have AJAX code where if you request an AJAX call to remote server the request fails:
function loadXMLDoc() { if (window.XMLHttpRequest) { // code for
You can use dynamic script loading. Here is an article that I wrote about it.