-
January 1st, 2006, 03:08 PM
#1
AJAX does not work with FireFox
Hi guys,
i got a little problem. my ajax code doesn't work proper
with IE it works great, but with FF it doesn't at all.
for info: the php i call gives back text with the 'echo'-method. so no xml! but this should not be an issue.
here is my code.
the alerter "biste da?" i never saw with FF
var response = "blabla" ;
function ServerRequest(DBID)
{
sndReq(DBID);
}
function sndReq(DBID) {
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
http = new ActiveXObject("Microsoft.XMLHTTP");
}else{
http = new XMLHttpRequest();
http.overrideMimeType('text/xml');
}
http.open('GET', 'http://localhost/fillme.php?action=' + DBID, false);
alert(http.readyState );
http.onreadystatechange = handleResponse;
alert(http.readyState );
http.send(null);
}
function handleResponse()
{
alert("biste da?");
if(http.readyState == 4)
{
if (http.status == 200)
{
response = http.responseText;
if(response.indexOf('|' != -1))
{
response = response.split("|||");
response = response[1];
}
}
}
}
Thanx in advance for help!!
PL
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|