I prefer to use the below scripts;

    $(document).ajaxStart( function () {
      $(".aloading").show();
    });
    
    $(document).ajaxStop( function () {
      $(".aloading").hide();
    });

put somewhere above body for example; 
<div class="aloading"></div>

and css

.aloading {
    display: none;
    border-style: none;
    position:fixed;
    left:45%;
    top :38%;
    width:66px;
    height:66px;
    background: url("/static/images/loaderblack.gif") no-repeat;
    z-index: 10001;
                }
I am not an expert this was what I came up once searched about years ago. I 
still keep it.

If you don't want to show "busy"  for some ajax calls set global to false 
in ajax call and the above scripts will not be triggered.

On Wednesday, March 18, 2015 at 12:51:05 AM UTC+2, Dave S wrote:
>
> Is there an easy way to have the browser show your page is "busy" during 
> an AJAX call?
>
> (I *like* hourglasses.)
>
> /dps
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to