Nice approach! Seems reliable enough...
Richard On Fri, Jan 24, 2014 at 4:55 PM, Tim Richardson <[email protected]>wrote: > I have a form I want to use on a number of controller function views, so I > have used LOAD. > I want this form to reload its parent page. > I still want to keep it modular, so hard-coding the parent URL in the > LOADed controller function is not useful. > I have done this: > > > > {{=LOAD('default','choose_saasu_file.load',ajax=True,vars={'parent_controller':request.controller,'parent_function':request.function})}} > > and then in the LOADed controller function: > > ... > if form.process().accepted: > ... > redirect(URL(request.vars.parent_controller,request.vars. > parent_function),client_side=True) > > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

