AJAX call using JQuery
Example
$.ajax({url:validateUrl,
type: 'POST',
async:false,
data: 'method=validateCondition&condition='+data,
success: function(answerFromServer){
onSuccessValidateCondition(answerFromServer,fieldId);
}
});
Description:
url: URL where the AJAX call will be send.
type: POST , GET etc
async: true/false (Default is True, True will allow other content of the page to load independently of the ajax call. false is reverse of it)
data: the particular method of the servlet you want to call, and other parameters you can append.
sucess: function(answerFromServer){} : answerFromServer will contains the data sent by server in response of the ajax call
Example
$.ajax({url:validateUrl,
type: 'POST',
async:false,
data: 'method=validateCondition&condition='+data,
success: function(answerFromServer){
onSuccessValidateCondition(answerFromServer,fieldId);
}
});
Description:
url: URL where the AJAX call will be send.
type: POST , GET etc
async: true/false (Default is True, True will allow other content of the page to load independently of the ajax call. false is reverse of it)
data: the particular method of the servlet you want to call, and other parameters you can append.
sucess: function(answerFromServer){} : answerFromServer will contains the data sent by server in response of the ajax call
No comments:
Post a Comment