Prova cosi:
e aggiungi un div nel documento con id "risposta"codice:function update_dati() { // branch for native XMLHttpRequest object if (window.XMLHttpRequest) { add_dato= new XMLHttpRequest(); add_dato.open("GET", "inc/update.asp?l=it" ,true); add_dato.send(null); // branch for IE/Windows ActiveX version } else if (window.ActiveXObject) { add_dato= new ActiveXObject("Microsoft.XMLHTTP"); if (add_dato) { add_dato.open("GET", "inc/update.asp?L=it" ,true); add_dato.send(); } } add_dato.onreadystatechange=function(){ //alert(ajx.responseText) if (add_dato.readyState == 4 && add_dato.status==200){ document.getElementById('risposta').innerHTML=add_dato.responseText; } } }
< a href="javascript:void(0);" onclick="update_dati();">prova</ a>
<div id="risposta"></div>
![]()

Rispondi quotando