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
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
Hi,
where could I find implementation of LOAD (like
{{=LOAD('sniffer','getResults',ajax=True)}}) function?
Thanks
--
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
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
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
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
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
8 matches
Mail list logo