Search This Blog

Wednesday 1 April 2015

Jquery Ajax Example


Basic Jquery Ajax implementation :
type:Get/Post
url:url to be reffered
response :the response received from server

$.ajax({  url: 'URL_To_Be_Referred',  type: 'GET',success: function(response, textStatus, xhr) {
 //called when successful
 alert(response);
  },
  error: function(e) {
 //called when there is an error
 //console.log(e.message);
  }
});