I\'d like to make an ajax call as a POST, it\'s going to go to my servlet. I want to send parameterized data, like the following:
var mydata = \'param0=some_
can this help you
function CallPageSync(url, data) {
var response;
$.ajax({
async: false,
url: url,
data: data,
timeout: 4000,
success: function(result) {
response = result;
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
response = "err--" + XMLHttpRequest.status + " -- " + XMLHttpRequest.statusText;
}
});
return response;
}
and you can call it like
response = CallPageSync(checkPageURL, "un=" + username);