I found this workaround : response.js = "window.open('%(url1)s'); window.open('%(url2)s');" % {'url1': URL(c='controller', f='func1', extension=False, vars=dict(var1=var1, **var2_dict)), 'url2': URL(c='controller', f='func2', extension=False, vars=dict(var1=var1))}
As one of the suggestion of Niphold... Thanks for your help! Richard On Wed, Mar 19, 2014 at 9:32 AM, Richard Vézina <ml.richard.vez...@gmail.com > wrote: > Thanks for suggestion! > > Richard > > > On Wed, Mar 19, 2014 at 1:23 AM, Limedrop <russ...@holtrd.com> wrote: > >> Posted to soon. To clarify, the cookies need to be set in your download >> function: >> >> {{view}} >> >> response.files.append(URL('static','jquery.fileDownload/jquery.fileDownload.js')) >> >> >> >> {{controller}} >> response.js = '$.fileDownload(" >> http://127.0.0.1:8000/sgddms/label/download_func1?var1=2676&var1=2673&var1=2678 >> ");' >> response.js += '$.fileDownload(" >> http://127.0.0.1:8000/sgddms/label/download_func1?var1=2676&var1=2673&var1=2678 >> ");' >> >> >> {{download_func1}} >> >> # these cookies are required by jQuery.fileDownload.js >> # to enable download via ajax >> response.cookies['fileDownload'] = 'true' >> response.cookies['fileDownload']['path'] = "/" >> >> >> >> On Wednesday, March 19, 2014 6:18:11 PM UTC+13, Limedrop wrote: >>> >>> You might want to look at http://johnculviner.com/ >>> jquery-file-download-plugin-for-ajax-like-feature-rich-file-downloads/ >>> >>> The only fiddly bit is to make sure you set the cookies correctly (see >>> the documentation for details). >>> >>> For example: >>> >>> {{view}} >>> response.files.append(URL('static','js/jquery.fileDownload/jquery. >>> fileDownload.js')) >>> >>> >>> {{controller}} >>> response.js = '$.fileDownload("http://127.0.0.1:8000/sgddms/label/ >>> download_func1?var1=2676&var1=2673&var1=2678");' >>> response.js += '$.fileDownload("http://127.0.0.1:8000/sgddms/label/ >>> download_func1?var1=2676&var1=2673&var1=2678");' >>> # these cookies are required by jQuery.fileDownload.js >>> # to enable download via ajax >>> response.cookies['fileDownload'] = 'true' >>> response.cookies['fileDownload']['path'] = "/" >>> >>> >>> >>> >>> >>> >>> -- >> 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 web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.