Let's say that the action /default/loggedin.load/user/<id> updates the 
app's logged in list and returns an html list with their names.

Then you could use this in the layout.html view:

{{=LOAD(c="default", "f="loggedin.load", args=["user", auth.user_id], 
timeout=60000, times="infinity")}}

That should update the logged in users for both client and server with 60 
seconds intervals.

LOAD options are documented 
here<http://www.web2py.com/examples/static/epydoc/web2py.gluon.compileapp-module.html>
.

El viernes, 25 de mayo de 2012 05:49:03 UTC-3, IVINH escribió:
>
>
>
> Vào 21:13:25 UTC+7 Thứ năm, ngày 24 tháng năm năm 2012, Alan Etkin đã viết:
>>
>> 3) Put a LOAD("loggedin.load", ... ) *ajax call using its timing options*in 
>> the layout view so it updates after seconds/minutes elapsed. The 
>> loggedin action could return a list of logged in users also to the client.
>>
>>
> Thank Alan Etkin, but " *ajax call using its timing options**" : *how can 
> do it?*
> *
>

Reply via email to