how to create real-time web pages with web2py ?

已查看 133 次
跳至第一个未读帖子

hgh_...@163.com

未读,
2015年11月14日 06:49:202015/11/14
收件人 web2py-usuarios
how to create real-time web pages with web2py ?
for example, I can display the user register numbers in a web page, or 
I can update a chart periodically to get a real-time effect by using a timer to insert the new data in the plot and redraw it.

isi_jca

未读,
2015年11月18日 16:43:222015/11/18
收件人 web2py-usuarios
Hi!!!.

In the next link http://www.web2pyslices.com/slice/show/1335/client-tools-for-web2py, there is an example about a timer. Example

This will call a server function once after 5 seconds:

def index():
    callback = js.call_function(handle_it)
    page.ready(js.delay(callback, 5000))
    return dict()
def handle_it():
    return js.alert("Gotcha!")
Greetings.
回复全部
回复作者
转发
0 个新帖子