function MakePostRequest(filename)
{
if (window.XMLHttpRequest) // Object of the current windows
{
xhr = new XMLHttpRequest();
}
else
if (window.ActiveXObject) // ActiveX version
{
xhr = new ActiveXObject("Microsoft.XMLHTTP"); // Internet Explorer
}
mid=document.updmem.updid.value;
fname=document.updmem.updfname.value;
lname=document.updmem.updlname.value;
email=document.updmem.updemail.value;
usr=document.updmem.updusr.value;
pass=document.updmem.updpass.value;
home=document.updmem.updhome.value;
addr1=document.updmem.updaddr1.value;
if (document.updmem.updaddr2.value.length==0){
addr2='NULL';
}
else{
addr2=document.updmem.updaddr2.value;
}
if (document.updmem.updmob.value.length==0){
mob='NULL';
}
else{
mob=document.updmem.updmob.value;
}
id=document.updmem.updusr.value;
url="?updid="+mid+"&&updfname="+fname+"&&updlname="+lname+"&&updemail="+email+"&&updusr="+usr+"&&updpass="+pass+"&&updhome="+home+"&&updaddr1="+addr1+"&&updaddr2="+addr2+"&&updmob="+mob;
filename=filename+url;
//alert(filename);
xhr.onreadystatechange =function chk()
{
if (xhr.readyState == 4){
alert(xhr.status);
if (xhr.status==200){
document.getElementById(id).innerHTML+=xhr.responseText;alert(xhr.responseText) ;
}
}
}
//alert(filename);
xhr.open('GET', filename, true);
xhr.send(null);
}
This is my ajax.js file..I am retrieving the values from a form and the sending them to my filename.I am not getting the expected results.I should be getting the xhr.status as 200 but it is 0.Usually this implies that my filename is incorrect bt I check it and it is correct..Help me,I need to sort this out anyhow..How can I get my status message as 200...
Thanks in adv...