Thanks for the link Brian. Checking it out right now.

On Tuesday, September 29, 2015 at 9:19:33 PM UTC-4, Brian M wrote:
>
> Yeah, with a little looking, and also another recent post here, you can't 
> start a download with JavaScript so you'll have to do something else. 
> Either just redirect the user to a download page that'll generate the CSV 
> or else look into using something like this --> 
> http://johnculviner.com/jquery-file-download-plugin-for-ajax-like-feature-rich-file-downloads/
>  
> I haven't tried that but it looks interesting.
>
> On Monday, September 28, 2015 at 11:04:57 PM UTC-5, DenesL wrote:
>>
>>
>> Yes, the content is properly set but it is returned as the component 
>> content instead of a separate file, which is what should happen IMHO.
>> What I need is some way to "cancel" the LOAD so the file is returned 
>> instead and the component is not updated, because otherwise it would become 
>> empty.
>>
>> So far the best solution seems to be to create the file and set a link to 
>> download it as part of the LOAD return, a two step process for the export 
>> scenario.
>> I was just hoping someone had a better idea.
>>
>> Thanks,
>> Denes
>>
>>  
>>
>> On Monday, September 28, 2015 at 8:38:37 PM UTC-4, Brian M wrote:
>>>
>>> Have you tried setting the appropriate content type header before 
>>> returning? I've not done it inside a LOAD before but know that setting the 
>>> content type will normally get the browser to download & save a CSV file 
>>> rather than just display it.
>>>
>>> Brian
>>>
>>

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