I think the issue is not in the onclick but the href. When you set the
callback but don't set an explicit href, the A() helper should set href to
"#null", but for some reason, his code is appending #null to an actual URL.
I can't reproduce that when I run the same code.
Anthony
On Thursday, August 30, 2012 4:03:29 PM UTC-4, Massimo Di Pierro wrote:
>
> The quotes are escaped when in between quotes. That is the correct thing
> to do for security. It works fine or does it not?
>
> On Thursday, 30 August 2012 07:00:25 UTC-5, Daniel Gonzalez wrote:
>>
>> Hi,
>>
>> I have the following markup in an html viewfile:
>>
>> {{=DIV(A('click me',callback=URL('mycallback'),target="me"),_id="me")}}
>> {{=URL('mycallback')}}
>>
>> Which is producing the following html:
>>
>> <div id="me"><a href="
>> http://localhost:8000/web2py_jquery/default/index#null" onclick="ajax(&#
>> 39;/web2py_jquery/default/mycallback',[],'me');return
>> false">click
>> me</a></div>
>> /web2py_jquery/default/mycallback
>>
>> (web2py_jquery is just my test application)
>>
>> I do not understand why =URL('callback') is rendering differently
>> depending on the context. Specially the "#null" makes me worry
>> Is this expected?
>>
>> Thanks,
>> Daniel
>>
>
--