Hello,
I have a small code which needs to authenticate against a service and return me the key.
Following is the code, which works fine in IE8, the same is not working in Firefox(getting empty response).
Any help is highly appreciated.
if (window.XMLHttpRequest)
{
http=new XMLHttpRequest();
}
else
{
http=new ActiveXObject("Microsoft.XMLHTTP");
}
if (http==null)
{
alert ("Browser does not support HTTP Request")
}
var params ="email=" + encodeURIComponent(email);
http.open('post',url,true);
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.onreadystatechange = function()
if(http.readyState == 4 && http.status == 200) {
alert(http.responseText);
}else{alert(http.responseText);}
http.send(params);