I think I found my solution, in my controlling function when I send the 
response.js for the reload, I'm doing it like this now:

        spinner=CENTER(IMG(_src=URL(request.application,'static',
'images/ajax_loader_blue_256.gif')))
        response.js = 
"jQuery('#stackList').html('{0}');jQuery('#stackList').get(0).reload()".
format(spinner)



So instead of just sending the div a reload, I'm using a JQUERY call to 
replace the DIV with a CENTER IMG of my spinner.

It seems to work, can anyone think why this is a bad idea?


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