Okay, I have been trying to fix for the past couple hours but this is starting to become ridiculous.
On the first couple lines, I have this code:
var XMLHttpRequestObject = false;
if(window.XMLHttpRequest){
XMLHttpRequestObject = new XMLHttpRequest();
}
else if(window.ActiveXObject){
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
}
else{
document.write("Sorry the page could not load");
}
The thing is, the first time I load the javascript containing this script, it has no errors. Works 100% error free. However, when I return to the SAME PAGE or another page with the same javascript from the same folder, I get an error that says, "Object doesn't support this method or property." How could that possibly be? It was working fine just a second ago?
P.S.: Refreshing, get's rid of the error. But coming to the same page using navigation creates the error as well as traversing to other parts of the website using the same javascript folder. Refreshing on those pages also remove the error.
On the first couple lines, I have this code:
var XMLHttpRequestObject = false;
if(window.XMLHttpRequest){
XMLHttpRequestObject = new XMLHttpRequest();
}
else if(window.ActiveXObject){
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
}
else{
document.write("Sorry the page could not load");
}
The thing is, the first time I load the javascript containing this script, it has no errors. Works 100% error free. However, when I return to the SAME PAGE or another page with the same javascript from the same folder, I get an error that says, "Object doesn't support this method or property." How could that possibly be? It was working fine just a second ago?
P.S.: Refreshing, get's rid of the error. But coming to the same page using navigation creates the error as well as traversing to other parts of the website using the same javascript folder. Refreshing on those pages also remove the error.