bom estou tentando enviar dois valores get com este codigo:
var xmlhttp = null;
function ajaxRating(id,votos) {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest != 'undefined' ) {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = false;
}
}
if (xmlhttp) {
xmlhttp.onreadystatechange = processadorMudancaEstado;
xmlhttp.open("GET", "http://www.site.com/recebe_voto.php?id=" + id + "&rating=" + votos ,true);
xmlhttp.setRequestHeader('Content-Type','text/xml');
xmlhttp.setRequestHeader('encoding','ISO-8859-1');
xmlhttp.send(null);
}
}Aqui a função para readystatechange:
function processadorMudancaEstado () {
if ( xmlhttp.readyState == 4) { // Completo
if ( xmlhttp.status == 200) { // resposta do servidor OK
document.getElementById("rating").innerHTML =xmlhttp.responseText;
} else {
alert( "Problema: " + xmlhttp.statusText );
}
}
}estou enviando assim:<a href="java script:ajaxRating('2','5');">5</a>o problema é que no firefox e no ie só funcionou uma vez
quando tentei novamente, nada acontece!
o que pod ser?
no chrome funciona normal;











