6 Years
Discussion Span
Last Post by hielo

try the ajaxSend()


Look at the example right before the section titled "Example". By looking at the settings.url (or perhaps settings.data) you will be able to know which field is triggering the request )


So that while the backend is busy, it shows the gif, when it's finished, it hides the gif...

That tells me that you are emitting an ajax request (somehow - most likely using the "remote" validation option). If that is the case, then is you use the jquery ajaxSend() method, before the request is actually sent you will be able to "know" that the request is about to be "emitted". So at that point you show your image.

Imagine you initially have

<div id="myloader"><img src="imageloader.gif" .../></div>

also, in your css you may have:


then in your ajaxSend() method you can do $("#myloader").show()


ajaxSend() is part of the jquery's $.ajax() utility. Under the hood, the remote option will be using $.ajax(). So if you use ajaxSend() as suggested, it will be "honored".

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.