Forum Moderators: open
Line 67 - Character 43
System error -107289665
Code: 0
I can debug easy javascript, but this one is out of my head ;)
function file(fichier) {
if(window.XMLHttpRequest) //FOR FIREFOX
xhr_object = new XMLHttpRequest();
else if(window.ActiveXObject) //FOR IE
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
else return(false);
xhr_object.open("GET", fichier, false);
xhr_object.send(null);
if(xhr_object.readyState == 4) return(xhr_object.responseText); // THIS IS LINE 67
else return(false);}
I guess the problem is with xhr_object.
Any help?
Thank you
xhr_object into a local variable?
Well, if I understand what the script does and get familiar with heavy javascript, then I could do some modifications.
Well, I am sorry to say that this script is pure copy & paste.
Do you think the fact my page are HTML Transitional and not XML (Microsoft.XMLHTTP?) has something to do with the error message.
var xhr_object = new XMLHttpRequest();
I reckon this won't come into play here, as it is a synchronous request, and JS doesn't support concurrent threads, so there's no interference.
I would be surprised if it had anything to do with the pages being XML or not. The responseText will can return any text file.
This may have something to do with the existence of the requested file, or the mime-type it is being served up as. When I run it in IE, it runs without error.