Skip to content


IE7 suportará o objeto XMLHTTPRequest

Estava na hora já não!?

tirada do blog do IE

if (window.XMLHttpRequest){
// IE7, Mozilla, Safari, etc: browsers decentes
var xmlHttp = new XMLHttpRequest()
}
else
{
if (window.ActiveXObject){
// …outro jeito, usando o ActiveX para IE5.x e IE6
var xmlHttp = new ActiveXObject(”Microsoft.XMLHTTP”);
}

}

Posted in AJAX, Web Standards.


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Willianson de Al. Araújo says

    Parabens pelo post Felipe.

    O script compartilhado por voce me ajudou muito, entretanto, realizando alguns testes em diferentes navegadores e versões, cheguei a uma breve correção. Sem mais, segue abaixo.

    Parabens por compartilhar boas informações.

    ——————————————

    var http; // referência ao objeto XMLHttpRequest

    if(window.XMLHttpRequest && navigator.appVersion.indexOf(’MSIE’) < 0){
    http = new XMLHttpRequest();
    }
    else if(window.ActiveXObject){
    http = new ActiveXObject(”Msxml2.XMLHTTP”);
    if(!http){
    http = new ActiveXObject(”Microsoft.XMLHTTP”);
    }
    }
    else{
    http = null;
    }



Some HTML is OK

or, reply to this post via trackback.