... well if thats too confusing then you can do the following and
bypass the nested quotes all together.

onclick="javascript:demo('{{=URL(r=request,c='demo',f='index')}}')"

-Thadeus





On Wed, Dec 23, 2009 at 12:54 PM, Jonathan Lundell <[email protected]> wrote:
> On Dec 23, 2009, at 10:06 AM, Thadeus Burgess wrote:
>
>> <a class="adiv" onmouseover="this.style.cursor='pointer';"
>> onclick="javascript:demo('%s')"%URL(r=request,c='demo',f='index')>
>>
>> You need the template python brackets.
>>
>> <a class="adiv" onmouseover="this.style.cursor='pointer';"
>> onclick={{="javascript:demo('%s')"%URL(r=request,c='demo',f='index')}}>
>
> This is a slightly tricky case because of the nested quotes. The solution 
> above loses the double quotes around the onclick value. (There are multiple 
> solutions, of course.)
>
>>
>> -Thadeus
>>
>>
>>
>>
>>
>> On Wed, Dec 23, 2009 at 11:52 AM, annet <[email protected]> wrote:
>>> Massimo and Jonathan,
>>>
>>>> I do not why but why not just
>>>>
>>>> <a class="adiv" href={{=URL(r=request,c='demo',f='index')}}
>>>> target="demo">
>>>
>>> Thanks, that solves my problem in this case, because I don't need to
>>> re-size the window.
>>>
>>>
>>> Maybe because you never escape your Python code?
>>>
>>> <td>
>>>  {{=A
>>> (club.bedrijf.bedrijfsnaam,_onmouseover="this.style.cursor='pointer';",
>>> \
>>>  _onclick="javascript:clublocatordetails('%s')"%URL
>>> (r=request,f='details',args=[club.bedrijf.id]))}}
>>> </td>
>>>
>>> I based my code on the lines of code above. However, since I don't
>>> think I could replace:
>>>
>>> club.bedrijf.bedrijfsnaam
>>>
>>> with:
>>>
>>> <h2>Fitwise Demo Applicatie</h2>
>>> <p>In de Demo Applicatie ...</p>
>>>
>>> I gave this a try:
>>>
>>> <a class="adiv" onmouseover="this.style.cursor='pointer';"
>>> onclick="javascript:demo('%s')"%URL(r=request,c='demo',f='index')>
>>>  <h2>Fitwise Demo Applicatie</h2>
>>>  <p>In de Demo Applicatie ...</p>
>>> </a> <!-- adiv -->
>>>
>>> By escaping my Python code you mean escaping this line:
>>>
>>> onclick="javascript:demo('%s')"%URL(r=request,c='demo',f='index')
>>>
>>> ... how would I do that?
>>>
>>>
>>> Kind regards,
>>>
>>> Annet.
>>>
>>> --
>>>
>>> You received this message because you are subscribed to the Google Groups 
>>> "web2py-users" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to 
>>> [email protected].
>>> For more options, visit this group at 
>>> http://groups.google.com/group/web2py?hl=en.
>>>
>>>
>>>
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/web2py?hl=en.
>>
>>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to