opening a new page was an hypothetical workaround
response.stream() is perfect, thank you

Marco

On Friday, August 23, 2013 2:30:36 PM UTC+2, Niphlod wrote:
>
>
>
> On Friday, August 23, 2013 10:49:07 AM UTC+2, Marco Prosperi wrote:
>>
>>
>> hello, I would like to track the number of user download of some files on 
>> database. The approach I've thought about is:
>> - when the user clicks on the filename link in the first view, myapp 
>> redirects to a new page (a controller is called which register on the 
>> database the new click) with 'your download should start shortly'
>> - a dialog pops up to download the file
>>
>> The question is: how to pop up the download file automatically in the 
>> second view?
>>
>> thanks in advance for hints,
>>
>> Marco
>>
>
> the only way to achieve that is by opening a window with javascript..... 
> web2py.js ships with a $.web2py.popup(theurltoopen) just for the occasion, 
> but it's easy to do just window.open(url, 'name of the window'). The thing 
> is: do you really need an intermediate page just to count download clicks ?
>

-- 

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

Reply via email to