Are you suggesting using  ajax

<button onclick= "ajax('{{=URL("script","iCalDownload",  args =
request.args[0])}}',[], '')" class="btn btn-primary"><span class="glyphicon
glyphicon-export"></span>&nbsp;&nbsp;{{ =T('Export iCal') }}</button>

because the return from my function is

return exported_chunks_zip.getvalue()

2015-02-19 13:06 GMT+01:00 Vid Ogris <vid.og...@gmail.com>:

> on button click i am returning a file. Should it be any different with it.
> Also my response.flash or session.flash message is not working.Any ideas
> why?
>
> 2015-02-19 12:47 GMT+01:00 Leonel Câmara <leonelcam...@gmail.com>:
>
>> This will always go to a new page because you're following a link. You
>> need to make this an ajax call associated with the onclick of the button.
>> Then you can simply use response.flash to use the regular alerts web2py
>> already provides or response.js and you don't even need to return anything
>> else.
>>
>> --
>> 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 a topic in the
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/web2py/Q63J8bcFz80/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Lep pozdrav
>
> Vid Ogris
>
>
>


-- 
Lep pozdrav

Vid Ogris

-- 
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.

Reply via email to