[web2py] Re: ajax widget - asynchronously updated

2010-07-26 Thread Adi
And one more thing, in javascript check if return value is -1 before you refresh your widget via document.yourwidget.innerHTML = msg call. This will make sure the widget refreshes only if you want it to (driven by your controller logic). -- Adi On Jul 27, 9:56 am, Adi wrote: > Hi Tomas, > > Are

[web2py] Re: ajax widget - asynchronously updated

2010-07-26 Thread Adi
Hi Tomas, Are you sure setTimeout is not calling refreshWidget every second? Can you debug the javascript and see what's happening (in Firebug)? Your problem is not to load the widget once by Ajax (which is what I think the LOAD call will do), but to load it repeatedly. Also, if your list of item

[web2py] Re: ajax widget - asynchronously updated

2010-07-26 Thread Tomas Pelka
Hi, where could I find implementation of LOAD (like {{=LOAD('sniffer','getResults',ajax=True)}}) function? Thanks -- Tomas Pelka

Re: [web2py] Re: ajax widget - asynchronously updated

2010-07-25 Thread Tomas Pelka
Nobody knows? Harvesting web almost week, with no results. Have no idea how to solve this feature. Thanks for advices. On 07/19/2010 09:59 PM, Tomas Pelka wrote: Yes this is nice, but I thing this is better approach: in controler: def getResults(): . . return something in view: {{=LOA

Re: [web2py] Re: ajax widget - asynchronously updated

2010-07-19 Thread Tomas Pelka
Yes this is nice, but I thing this is better approach: in controler: def getResults(): . . return something in view: {{=LOAD('sniffer','getResults',ajax=True)}} Therefore this do not solve my problem :D Actually my previous idea (periodically update) was bad. Do web2py have capabilities to

[web2py] Re: ajax widget - asynchronously updated

2010-07-13 Thread weheh
Massimo, does this solve the problem I'm having? I have a background queue serving an app. The ajax script should refresh the DIV to show the status of the item of interest whilst the item is on the queue. Once the item is processed, it's deleted from the queue and the output is to be displayed in

[web2py] Re: ajax widget - asynchronously updated

2010-07-13 Thread mdipierro
The simplest solution is that you get generic.load from 1.80.1 and you replace function refreshWidget() { ajax('refresh_widget', [], 'mywidget'); } with function refreshWidget() { ajax('refresh_widget.load', [], 'mywidget'); } On 13 Lug, 16:46, Tomas Pelka wrote: > Thank you very much

[web2py] Re: ajax widget - asynchronously updated

2010-07-08 Thread Adi
Some frameworks have active data widgets - the widget updates whenever data changes. I'm not sure how exactly it can be implemented in web2py, but something like this should work: View (.html file): {{=mywidget}} setTimeout(refreshWidget, 1); // calls refreshwidget ev