7
I have the code below, to update a DIV on a page:
var req;
// FUNÇÃO BUSCA ROMANEIOS PARA EXIBIR NA TELA DE MENU.
function buscarRomaneio() {
// Verificando Browser
if(window.XMLHttpRequest) {
req = new XMLHttpRequest();
}
else if(window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
}
// Arquivo PHP juntamente com o valor digitado no campo (método GET)
var url = "PesquisaRomaneio.php";
// Chamada do método open para processar a requisição
req.open("Get", url, true);
// Quando o objeto recebe o retorno, chamamos a seguinte função;
req.onreadystatechange = function() {
// Exibe a mensagem "Buscando..." enquanto carrega
if(req.readyState == 1) {
document.getElementById('resultado').innerHTML = 'Buscando Romaneios...';
}
// Verifica se o Ajax realizou todas as operações corretamente
if(req.readyState == 4 && req.status == 200) {
// Resposta retornada pelo PesquisaRomaneio.php
var resposta = req.responseText;
// Abaixo colocamos a(s) resposta(s) na div resultado
document.getElementById('resultado').innerHTML = resposta;
}
}
req.send(null);
}
setInterval(buscarRomaneio, 60000); //Envia a informação a cada minuto
What happens is the following: In any browser the function works normally. Except in IE6, which will be the exclusive case that I will use (data collector). The function works once and for. I give F5 numerous times and does not change anything. Only changes if I clear the cache or close and open the browser.
Since it is a Windows CE 6, it is all very limited. There is something I can do in this code to solve this problem?
Windows CE 6, IE6, man, if you get the chance, light it on fire!
– Gabriel Rodrigues
What is the jQuery version you are using?
– Victor Stafusa
If you’re working at a company where the director insists on using IE6, then it’s past time for you to send your resume around and do some interviews.
– Victor Stafusa
The problem was the collectors bought... the value was high and all came in this configuration. I’m working on the code and as I change it the data fades/appears.....
– Diego
@Guilhermenascimento aberta.
– Diego
Who has denied, can you tell me what I can improve? The doubt is valid, I did not understand why the -1
– Diego
@Diego I did not deny, but I suppose it is because in the title and tag speaks jquery and in the code there is nothing about jQuery. I will edit and give you +1
– Guilherme Nascimento
@Guilhermenascimento, it was bad. The pressure here is great and I lost myself in terms. Sorry. And thanks for the answer, solved the problem :)
– Diego