SitePoint Zealot
Loading image for jquery ajax
I would like to implement a loading image for my jquery ajax code (this is when the jquery is still processing) below is my code:
$.ajax({
type: "GET",
url: surl,
dataType: "jsonp",
cache : false,
jsonp : "onJSONPLoad",
jsonpCallback: "newarticlescallback",
crossDomain: "true",
success: function(response) {
alert("Success");
},
error: function (xhr, status) {
alert('Unknown error ' + status);
}
});
}
How can I implement a loading image in this code.
Thanks
Create your own animated throbber at http://www.ajaxload.info/ so that you can then show the image when the ajax process starts.
In the success callback you can then remove the image.
SitePoint Zealot
excellent didn't know there was a animated throbber "maker" online tks as usual Paul
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks