Thank for this, but it works opposite.

This does not POST, but reload content. My current situation POST
after reload (so next reload reflect POST).
How to POST and then reload?
I gues need to be done:
web2py_ajax_page('post',action,form.serialize(),target); (from
web2py_ajax.html)
But how to get known which target (it random I guess), form and action
need to be used?

On 22 авг, 23:23, mdipierro <mdipie...@cs.depaul.edu> wrote:
> If I understand
>
> form.element(_type='submit')['_onclick'] =
> XML("ajax('"+str(URL(r=request,f='export.load',args=[request.args(1),reques 
> t.args(2)]))
> +"',['rub_"+str(request.args(1))+"'], 'content'); return false;" )
>
> or simpler:
>
> form.element(_type='submit')['_onclick'] ="ajax('%s',['rub_%s'],
> 'content');retrun false" % (
> URL('export.load',args=[request.args(1),request.args(2)]),request.args(1))
>
> return false; should do what you ask.
>
> On Aug 22, 10:52 am, KMax <mkostri...@gmail.com> wrote:
>
>
>
> > Hello
> >  So we have a list of posts, which are need to be moderated. Each post
> > is a link which load crud.update on the particular post.
> >  I plan to update the list to reflect crud.update changes.
> >  So I put into crud form:
> > form.element(_type='submit')['_onclick'] =
> > XML("ajax('"+str(URL(r=request,f='export.load',args=[request.args(1),reques 
> > t.args(2)]))
> > +"',['rub_"+str(request.args(1))+"'], 'content');" )
>
> >  This works but, crud.update changes applyed after list reloaded. So
> > next reload shows changes.
> > Question: How to make form.submit via ajax before ajax reload? (in my
> > terms)
> > I try to make POST in onclick action, but failed due to lack of
> > parameters for ajax call (this ajax load crud form), but how to get it
> > known in _onclick definition?

Reply via email to