Forum Moderators: open

Message Too Old, No Replies

ajax not working with FF and working with IE

working with I.E but not working with FireFox

         

phparion

7:29 am on Sep 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi,

I have written an application in AJAX-PHP-MySQL. the application is working with I.E but not working with FireFox.

here is how I create the http object,

Code:

function getHTTPObject() {
var xmlhttp;

if(window.XMLHttpRequest){
xmlhttp = new XMLHttpRequest();
}
else if (window.ActiveXObject){
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
if (!xmlhttp){
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}

}
return xmlhttp;


}
var http = getHTTPObject(); // We create the HTTP Object

then i use this http object as
Code:

function requestNext(act) {

if (act == 'first') {
id=1

}
var sId = id;

http.open("GET", url + escape(sId) + "&action=" + act, true);
http.onreadystatechange = handleHttpResponse;
http.send(null);
//document.getElementById('divRec').innerHTML = "";

}

and other functions to communicate with PHP script.

can anybody help please why it is not working with FF and how to make it to work with FF too?

thanks in advance for your replies.

phparion

5:00 pm on Sep 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



dont keep silence please :( i am stuck badly as my application is completed but cant handover to client as it is working with I.E only without any problem and not working with Firefox :(( ..

there are many ajax gurus here pls help ...

thanks

jimbeetle

5:56 pm on Sep 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm certainly no guru, and certainly not certain that this is the issue, but do you have the Active X plug-in installed for Firefox?

phparion

4:24 am on Sep 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



yes, it is installed, the first version of this application was working on FF too , this beta version is not working... i just noticed that it is also not working on opera, only I.E is running it without any problem and FF and opera are not running it.... showing blank pages without error or warning

daveVk

5:40 am on Sep 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check which is any of the "xmlhttp = ..." statements fires, insert alert after each or something. "if(window.XMLHttpRequest)" test may be Ok I just use "if(XMLHttpRequest)" . For FF and opera above condition should be true, should not need activeX installed on FF, may confuse situation.
Probably another red herring, I use "get" in lower case.

[edited by: daveVk at 5:45 am (utc) on Sep. 8, 2006]