On Sunday, September 18, 2011 10:38:47 AM UTC-4, annet wrote:
>
> I changed the URL below:
>
> {{=A(row.bedrijf.bedrijfsnaam,_onmouseover="this.style.cursor='pointer';",_onclick="javascript:openwindow('%s','detailswindow',
>
>
> 792,744)"%URL(r=request,f='details',args=[row.bedrijf.id]))}}
>
> to:
>
> {{=A(row.bedrijf.bedrijfsnaam,_onmouseover="this.style.cursor='pointer';",_onclick="javascript:openwindow('%s','detailswindow',
>
>
> 792,744)"%URL('details',args=[row.bedrijf.id]))}}
>
> and wonder whether this is syntactically correct:
> URL('details',args=[row.bedrijf.id])
>
Yes, you don't have to name the a, c, and f arguments, even if you exclude
the a and the c -- the function knows that if it gets just one positional
argument to treat it as f and not a, and if it gets two positional arguments
to treat them as c, f and not a, c. The r argument defaults to the current
request, so no need to pass that. See the code
here: http://code.google.com/p/web2py/source/browse/gluon/html.py#129
Anthony
>
>
> Kind regards,
>
> Annet.