Tuesday, October 28, 2014

AJAX call using JQuery

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

No comments:

Post a Comment

Scrum and Scrum master

Scrum  Scrum is a framework which helps a team to work together.  It is like a rugby team (the scrum name comes from rugby game). Scrum enco...