Instead of
{{=LOAD('default','show_foods',ajax=True)}}

do
<div id="mystuff"><img src="...the loading indicator..."/></div>
<script>web2py_component('{{=URL(r=request,c='default',f='show_foods')}}','mystuff')</
script>

You can also have

<button
onclick="web2py_component('{{=URL(r=request,c='default',f='show_foods')}}','mystuff')">click
me to reload</script>

On Apr 9, 5:07 pm, Avik Basu <avikb...@gmail.com> wrote:
> Hi,
>
> Is there a way to reload a component that has been loaded with the
> LOAD function without sending a request back to the server?
>
> For example, I would like to reload a list of foods whenever the data
> has been altered by the user, but I would like only the component to
> reload instead of the whole page.
>
> #in view
> {{=LOAD('default','show_foods',ajax=True)}}
>
> Also, is there a way to use a loading indicator icon instead of the
> default 'loading...' message?
>
> Thanks,
> Avik


-- 
To unsubscribe, reply using "remove me" as the subject.

Reply via email to