Ver Mensaje Individual
  #12 (permalink)  
Antiguo 09/11/2009, 09:06
bebo
 
Fecha de Ingreso: octubre-2009
Mensajes: 97
Antigüedad: 14 años, 6 meses
Puntos: 4
Respuesta: Alguna Idea de como hacer esto?

Trata con ésta código:
votes.php:
Código:
<html>
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Documento sin título</title> 
<script type="text/javascript"> 
function objetoAjax(){ 
 var xmlhttp=false; 
 try { 
 xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
 } catch (e) { 
 try { 
 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
 } catch (E) { 
 xmlhttp = false; 
 } 
 } 
 if (!xmlhttp && typeof XMLHttpRequest!='undefined') { 
   xmlhttp = new XMLHttpRequest(); 
   } 
   return xmlhttp; 
} 

function votar(voto){ 
    ajax=objetoAjax(); 
    ajax.open("GET","vote.php?voto="+voto); 
    ajax.send(); 
    document.getElementById('area').innerHTML='Gracias.<br>Se ha agregado su voto.';
} 
</script> 
</head> 

<body> 
<img src="si.gif" border="0" onclick="javascript:votar('si')"> 
<div id=area></div>
</body> 
</html>