Solved it myself. The target should be ':eval' like this:

in the view:
{{=A('func', callback('func'), target=':eval')}}

in the controller:
def func():
   return 'jQuery(".flash").html("test").slideDown().delay(1000).slideUp();'




On Tuesday, March 26, 2013 10:55:23 AM UTC+1, Serbitar wrote:
>
> Hi folks,
>
> I am trying to do a session.flash after a function is called via A('func', 
> callback('func')).
>
> A simple session.flash in the callback function like:
>
> def func():
>     session.flash('test')
>     return dict()
>
>
> is not working.
>
> I found an old thread that suggests:
>
> def func():
> return 'jQuery(".flash").html("test").slideDown().delay(1000).slideUp();'
>
> and I think in the view I would have to add:
>
> {{=A('func', callback('func'), target='t')}}
> <div id="t"></div>
>
> but that does not work. Nothing is shown.
>
> Any ideas?
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to