Ok, the problem from other side: On page via ajax loading the list. Each list is a link to load via ajax a form. I need to reload the list whan form is submitted. 1. ajax form reload 2.then ajax list reload with updated data from the form --- I guess workaround for this issue could be following: page with list should contain hided forms for each item, then submittig of any of form should reload the list. ( no ajax inside ajax anymore ) PS I just tryed this workaround - same issue. I'l going to make test app for catch the root of the issue.
Thanks. On 23 авг, 08:19, mdipierro <[email protected]> wrote: > I think I need more explanation, a practical example of usage and an > example of code. I do not understand. > > On Aug 22, 11:39 am, KMax <[email protected]> wrote: > > > > > 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 <[email protected]> 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 <[email protected]> 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?

