bonjour voila jai ce script de recherche qui fonctionne tres bien sous firefox, mais qui ne fonctionne pas sous IE.
Est ce que quelqun peu me dire pk ? merci
function sendData(data, page, method)
{
if(document.all)
var XhrObj = new ActiveXObject("Microsoft.XMLHTTP");
else
var XhrObj = new XMLHttpRequest();
var content = document.getElementById('divRes');
if(method == "GET")
{
if(data == 'null')
XhrObj.open("GET", page);
else
XhrObj.open("GET", page+"?"+data);
}
else if(method == "POST")
XhrObj.open("POST", page);
XhrObj.onreadystatechange = function()
{
if (XhrObj.readyState == 4 && XhrObj.status == 200)
content.innerHTML = XhrObj.responseText ;
}
if(method == "GET")
XhrObj.send(null);
else if(method == "POST")
{
XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
XhrObj.send(data);
}
}