Oh, I see. Thank you!

Am Dienstag, 1. Januar 2019 19:46:50 UTC+1 schrieb Massimo Di Pierro:
>
> This
>
> {{=A('Your File', 
> callback=URL('tracker',vars=dict(contents=contents.id.id,art='zip')), 
> _onclick="window.open('%s');") % (download_file)}} 
> <http://groups.google.com/group/web2py/t/77c30b1fb678e96f?utm_source=digest&utm_medium=email>
>
> should be
>
> {{=A('Your File', 
> callback=URL('tracker',vars=dict(contents=contents.id.id,art='zip')), 
> _onclick="window.open('%s');" % download_file)}} 
> <http://groups.google.com/group/web2py/t/77c30b1fb678e96f?utm_source=digest&utm_medium=email>
>
> and it should be in a view .htmlfile.
> It assumes download_file is in scope. therefore it is either defined in a 
> model file or it is passed from the controller to the view.
>
> On Sunday, 30 December 2018 13:48:23 UTC-8, Stephan wrote:
>>
>> Hi,
>> How do I put a variable in the 2a helper? %s does not seem to work within 
>> {{=A 
>>
>> // download_file = "https://www.something.zip";
>>
>> {{=A('Your File', 
>> callback=URL('tracker',vars=dict(contents=contents.id.id,art='zip')), 
>> _onclick="window.open('%s');") % (download_file)}} 
>> <http://groups.google.com/group/web2py/t/77c30b1fb678e96f?utm_source=digest&utm_medium=email>
>>
>> Thanks for helping,
>> Stephan
>>
>

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