# Globally add spinners to AJAX calls

**URL:** <https://www.ruby-forum.com/t/globally-add-spinners-to-ajax-calls/108870>\
**Category:** Rails\
**Created:** [July 8, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/globally-add-spinners-to-ajax-calls/108870 "2007-07-08T14:46:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![helzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@helzer](https://www.ruby-forum.com/u/helzer)\
**Post date:** [July 8, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/globally-add-spinners-to-ajax-calls/108870/1 "2007-07-08T14:46:31Z")

</div>

Is there any way I can globally add some JS code to all my AJAX calls  
to implement user feedback - indicating that his action is being  
processed?

Something like automatically disabling the submit button and showing a  
spinner would be great.

Thanks,  
Amir

---

<div class="post-metadata">

**Author:** ![helzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@helzer](https://www.ruby-forum.com/u/helzer)\
**Post date:** [July 9, 2007, 12:09am UTC](https://www.ruby-forum.com/t/globally-add-spinners-to-ajax-calls/108870/2 "2007-07-09T00:09:56Z")

</div>

Thanks, great article!

Amir

---

<div class="post-metadata">

**Author:** ![helzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@helzer](https://www.ruby-forum.com/u/helzer)\
**Post date:** [July 8, 2007, 4:25pm UTC](https://www.ruby-forum.com/t/globally-add-spinners-to-ajax-calls/108870/3 "2007-07-08T16:25:40Z")

</div>

On Jul 8, 5:45 am, helzer [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there any way I can globally add some JS code to all my AJAX calls  
> to implement user feedback - indicating that his action is being  
> processed?
> 
> Something like automatically disabling the submit button and showing a  
> spinner would be great.
> 
> Thanks,  
> Amir

> **[GarbageBurrito.com is for sale | HugeDomains](https://www.hugedomains.com/domain_profile.cfm?d=garbageburrito.com)**
>
> Since 2005, we have helped thousands of people get the perfect domain name.
