Jump to content
NunoDinis

problema com xmlhttp no ie

Recommended Posts

NunoDinis

Boa tarde,

Utilizo esta função para fazer pesquisas dinâmicas numa tabela.

function EnviaFornecedores(fornecedores,empresas,pesquisa,contratos)
{
document.getElementById("fornecedores").value = fornecedores;
document.getElementById("empresas").value = empresas;
document.getElementById("contratos").value = contratos;

if (window.XMLHttpRequest)
 {// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
 }
else
 {// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
 }
xmlhttp.onreadystatechange=function()
 {
 if (xmlhttp.readyState==4 && xmlhttp.status==200)
   {
 document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
   }
 }

xmlhttp.open("GET","datefilter/ListarDados.php?fornecedores="+fornecedores+"&empresas="+empresas+"&pesquisa="+pesquisa+"&contratos="+contratos,true);
//alert(pesquisa);
xmlhttp.send();
}

Funciona perfeitamente e envia bem os dados, no entanto (principalmente no ie) se fizer refresh à página não me mostra a tabela e o problema está nesta função. Alguma ideia ?


Estranha forma de vida que tem a capacidade de transformar comandos em mensagens de erro.

ndsotware.org

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.