On Saturday, April 25, 2015 at 8:28:15 AM UTC-7, Gary Cowell wrote:
>
> I found that I can use:
>
> {{=LOAD('tenant','stackList.load',ajax=True, target="stackList",vars={
> 'reload_div':'stackList'},content=CENTER(IMG(_src=URL(request.application,
> 'static','images/ajax_loader_blue_256.gif'))))}}
>
> So this gives me a spinner gif inside my component div on page reload.
>
> It doesn't give me a spinner though, when 
>
> response.js = "jQuery('#stackList').get(0).reload()"
>
> is called.
>
> So my question still stands, the reload time for my stackList controller 
> is quite long, looks okay on page load, but spinner is missing on refresh.
>
> Do I have to do something more to get the spinner to work on refresh, or 
> should I be doing my component refresh a different way?
>

I believe the LOAD() loading message is triggered by ${document).ready(), 
and the reload call doesn't hit that trigger.

I have ajax calls that I run with "onclick" via a button, and doing that 
displays my spinner each time.  But using LOAD() puts that under a wrapper.

/dps



 

>
>
>
> On Tuesday, 21 April 2015 16:05:32 UTC+1, Gary Cowell wrote:
>>
>> Hello
>>
>> I have a DIV component I'm reloading using another controller , so I end 
>> up calling:
>>
>>        response.js = "jQuery('#stackList').get(0).reload()"
>>
>> Problem is, my stackList controller function does a lot of work to 
>> rebuild the grid, it makes many AWS api calls, to populate the grid.
>>
>> The reload works, and the grid eventually updates, but there is no 
>> indication that it's doing anything, it has the old values for ages (well, 
>> 10 seconds or so, seems like ages) after the other form is submitted then 
>> it snaps to its new output.
>>
>> How can I make the div update immediately with a spinning 'progress' , or 
>> maybe fade it out at the start of the refresh, and in at the end? Anything 
>> to provide a visual clue that the controller function is running, and that 
>> the display is stale
>>
>> Thanks
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to