aloh pessoal ,....preciso fazer refresh apenas da div txtHint
function carrinho()
{
var id = encodeURI(document.getElementById('menu1').value);
var qty = encodeURI(document.getElementById('qty').value);
if (id=="")
{
document.getElementById("txtHint").innerHTML="";
return;
}
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=content; // O PROBLEMA ESTA AQUI
}
}
xmlhttp.open("GET","add_carrinho.php?id="+id+"&qty="+qty,true);
xmlhttp.send();
}
Pergunta
lumasai
aloh pessoal ,....preciso fazer refresh apenas da div txtHint
function carrinho() { var id = encodeURI(document.getElementById('menu1').value); var qty = encodeURI(document.getElementById('qty').value); if (id=="") { document.getElementById("txtHint").innerHTML=""; return; } 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=content; // O PROBLEMA ESTA AQUI } } xmlhttp.open("GET","add_carrinho.php?id="+id+"&qty="+qty,true); xmlhttp.send(); }Link para o comentário
Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.