Request.QueryString works fine with GET and is easy to test, but I’m not sure what could be failing (if anything) on the ASP side. How do you test a POST page? With a GET it’s easy because you just put it in the URL.
Make a cross-browser instance of the required class
var httpRequest;
if (window.XMLHttpRequest) { // Mozilla, Safari, ...
httpRequest = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE 8 and older
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
Declare a response handler:
httpRequest.onreadystatechange = processResponse;
Make the request:
var data = "name=Pullo&skillLevel=mighty"
httpRequest.open('POST', 'submit.php', true);
httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
httpRequest.send(null);
On the server do something with the data received:
function processResponse(){
if (httpRequest.readyState === 4) {
// everything is good, the response is received
if (httpRequest.status === 200) {
// perfect!
console.log(httpRequest.responseText);
} else {
console.log(httpRequest);
// there was a problem with the request,
// for example the response may contain a 404 (Not Found)
// or 500 (Internal Server Error) response code
}
} else {
// still not ready
}
}
This way you can see what the server is doing and inspect the response.