function callServer() { // Build the URL to connect to var url ="/test.aspx?id="+ escape(id) +"&name="+ escape(name); // Open a connection to the server xmlHttp.open("GET", url, true); // Setup a function for the server to run when it's done xmlHttp.onreadystatechange = updatePage; // Send the request xmlHttp.send(null); }
function updatePage() { if (xmlHttp.readyState ==4) { var response = xmlHttp.responseText; } }
/* Create a new XMLHttpRequest object to talk to the Web server */var xmlHttp = false;/*@cc_on @*//*@if (@_jscript_version >= 5)try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {...