by saintSR » Thu Feb 21, 2008 9:32 pm
I think I have narrowed the problem down to FF not accecpting or processing the data back for the PHP script. IE process the data and displays the information as intended
I used the prompt function to display what was happening. the onreadystatechange function loops thru the process. both IE and FF complete readystates 1 and 2 (both IE and FF display the prompt at line 146). FF never displays the prompt at line 149. Or 151 for that matter.
Both IE and FF display prompts for readystate 4. But where IE has the data at that point to display, FF is just empty.
the data from the PHP file is echoed to both browsers. IE displays it. FF does not.
I'm not sure why FF fails readystate 3. actually FF never executes readystate 3 even if readystate 2 completes.
any ideas....?
[code]if (this.xmlhttp) {
var self = this;
if (this.method == "GET") {
totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString;
this.xmlhttp.open(this.method, totalurlstring, true);
} else {
this.xmlhttp.open(this.method, this.requestFile, true);
try {
this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
} catch (e) { }
}
this.xmlhttp.onreadystatechange = function() {
switch (self.xmlhttp.readyState) {
case 1:
self.onLoading();
break;
case 2:
self.onLoaded();
prompt('line-146',self.xmlhttp.readyState);
break;
case 3:
prompt('line-149',self.xmlhttp.readyState);
self.onInteractive();
prompt('line0-151',self.xmlhttp.readyState);
break;
case 4:
self.response = self.xmlhttp.responseText;
self.responseXML = self.xmlhttp.responseXML;
self.responseStatus[0] = self.xmlhttp.status;
self.responseStatus[1] = self.xmlhttp.statusText;
if (self.execute) {
self.runResponse();
}
if (self.elementObj) {
elemNodeName = self.elementObj.nodeName;
elemNodeName.toLowerCase();
if (elemNodeName == "input"
|| elemNodeName == "select"
|| elemNodeName == "option"
|| elemNodeName == "textarea") {
self.elementObj.value = self.response;
} else {
self.elementObj.innerHTML = self.response;
}
}
if (self.responseStatus[0] == "200") {
self.onCompletion();
} else {
self.onError();
}
self.URLString = "";
self.URLString = “â€