Ajax Status
XMLHttpRequest Object Properties
if (window.XMLHttpRequest) { xhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xhttp = new ActiveXObject("Microsoft.XMLHTTP"); } //O QUE SERÁ ALTERADO NA PAGINA xhttp.onreadystatechange = function () { if ((this.readyState === 0)){ alert("0: request not initialized "); } else if ((this.readyState === 1)){ alert("1: server connection established"); } else if ((this.readyState === 2)){ alert("2: request received "); } else if ((this.readyState === 3)){ alert("3: processing request "); } else if ((this.readyState === 4)){ alert("4: request finished and response is ready"); document.getElementById("listaResultadoCurso").innerHTML = this.responseText; } else if (this.status === 200) { alert("200: OK"); } else if (this.status === 403) { alert("403: Forbidden"); } else if (this.status === 404) { alert("404: Not Found"); } else { alert("Nenhuma das Alternativas"); } };
10 Total Visualizações, 1 Visualizações Hoje
Veja também:
mini Dicionário com os principais termos e comandos em lógica de programação em C
@font-face - Quando a fonte do site não está presente no computador do usuário
Habilitando e Desabilitando Constraint Restrições no SQL
Publicar um novo Post para o Twitter automaticamente
Criando Parâmetros no Crystal Report