Ajax loading info using beforeSend

by Prakash 2013-09-06 10:44:04

We can show the loading info while the ajax request is fetching response from the server. As shown in the following code we can show Jquery Ajax loading info using beforeSend

$.ajax({//Make the Ajax Request
type: "GET",
url: "notifications/loadajax.php",
data: "lastid="+last_msg_id,
beforeSend: function() {
$('a.load_more').html('Loading...');//Loading info during the Ajax Request
},
success: function(html){
//ajax success process.

}
});

Tagged in:

1027
like
0
dislike
0
mail
flag

You must LOGIN to add comments