At the moment I\'m using the post method like this
$.ajax({
type: \"POST\",
url: \"Servicename.asmx/DoSomeCalculation\",
data: \"{param1ID:\"+ par
There is a "async" flag for making the ajax call synchronous or asynchronous. You can define it as:
$.ajax({
async: false/true,
//rest of code
});
You can decide if you want the ajax call to be async or not using this:
$.ajax({
async: false/true,
//more options
});
To answer your first point, no: GET and POST are independent of synchronous / asynchronous.
You can use the boolean async
method to control this.
look this sample maybe help you
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","ajax_info.txt",true);
xmlhttp.send();