$.ajax({
url: 'file.html',
type: 'get',
beforeSend: function() {
// add loading image
},
success: function(data) {
("#msg").html(data);
},
error: function() {
alert('something bad happened...');
}
});
On Jul 14, 11:05 am, Fabio Milheiro <[email protected]> wrote:
> This example is not clear enough (at least for
> me..)http://docs.jquery.com/Ajax/ajaxSend
>
> I want something simple such as the user clicking and a "waiting.gif"
> image is presented in order to let the user know that the server is
> working on it.
>
> $.get("file.html",
> function(data){
> $("#msg").html(data);
> });
>
> How do I get the ajaxSend to work with the above code (above code is
> working).
>
> Thank you