please be more specific..

In timer_tick I do a db query, and I need to pass a value to succeed
on that query.
I could save the value in the session.value, but that wouldn't work
out when there are 2 pages open, that's why I want to pass it to
timer_tick


On Sep 1, 3:13 pm, "mr.freeze" <[email protected]> wrote:
> You can't pass arguments to exposed functions. Use the method(s) I
> outlined instead:
> def timer_tick():
>     if request.vars.my_var_passed_in_data:
>         ....
>
> I can be more specific if you tell me what you are trying to pass to
> timer_tick.
>
> On Sep 1, 8:57 am, Francisco Costa <[email protected]> wrote:
>
>
>
>
>
>
>
> > But i want to pass a value to the function timer_tick
> > something like this
>
> >     callback = js.call_function(timer_tick(arg))
>
> > but the function
> >     def timer_tick(arg):
>
> > doesn't load properly
>
> > On Sep 1, 2:02 pm, "mr.freeze" <[email protected]> wrote:
>
> > > If you're talking about the Client Tools module located 
> > > here...http://www.web2pyslices.com/main/slices/take_slice/8
> > > ...there is an 'data' parameter in event.listen that you can use. It
> > > can be a jQuery selector (default is 'form:first') and will show up in
> > > request.vars. If you don't need to grab the value of an element, then
> > > you can use the 'args' parameter and it will show up in request.args.
>
> > > On Sep 1, 6:44 am, Francisco Costa <[email protected]> wrote:
>
> > > > i have this autorefresh
>
> > > >     form = SQLFORM.factory(Field('AutoUpdates',
> > > > requires=IS_IN_SET(['On','Off']),default="On",
> > > > widget=SQLFORM.widgets.radio.widget))
> > > >     refresh.ready(jq("input[type='submit']").hide()())
> > > >     callback = js.call_function(timer_tick)
> > > >     refresh.ready(js.timer(callback,10000))
> > > >     event.listen('change',"input[name='timer']",timer_tick)
>
> > > > the thing is i want to call the function timer_tick with an argument
> > > > and the use it like this
>
> > > >     def timer_tick(arg):
> > > >         arg_passed=arg
>
> > > > How I do the js.call_function() and the event.listen()  ?

Reply via email to