// Documento JavaScript voto con estrellas por Martín Dos Santos var xmlhttp /*@cc_on @*/ /*@if (@_jscript_version >= 5) try { xmlhttp=new ActiveXObject("Msxml2.XMLHTTP") } catch (e) { try { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP") } catch (E) { xmlhttp=false } } @else xmlhttp=false @end @*/ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest (); } catch (e) { xmlhttp = false} } function myXMLHttpRequest () { var xmlhttplocal; try { xmlhttplocal = new ActiveXObject ("Msxml2.XMLHTTP")} catch (e) { try { xmlhttplocal = new ActiveXObject ("Microsoft.XMLHTTP")} catch (E) { xmlhttplocal = false; } } if (!xmlhttplocal && typeof XMLHttpRequest != 'undefined') { try { var xmlhttplocal = new XMLHttpRequest (); } catch (e) { var xmlhttplocal = false; } } return (xmlhttplocal); } function votar(puntuacion,id){ var score; score = document.getElementById('score'); ajax=myXMLHttpRequest(); ajaxToken = "3jut0b2umayuf0g"; ajax.open("GET","rating-ajax-query.php?puntuacion=" + puntuacion + "&id=" + id + "&token=" + ajaxToken,true); ajax.setRequestHeader("AJAX-Token", ajaxToken); ajax.onreadystatechange=function(){ if(ajax.readyState==1){ score.innerHTML = "   Votando/Voting..."; }else if(ajax.readyState==4){ if(ajax.status==200){ score.innerHTML = ajax.responseText; }else if(ajax.status==404){ score.innerHTML = "La página no existe"; }else{ score.innerHTML = "Error:".ajax.status; } } } ajax.send(null); } function alto(){ }