4 Oct
2004
4 Oct
'04
7:11 p.m.
Laura McCord wrote:
The following code performs an expansion using the onClick.
<a href="#" tal:attributes="onClick string:expandIt('${resString}');; return false;"> <IMG NAME="imEx" SRC="triUp2.gif" WIDTH=15 HEIGHT=15 BORDER=0 ALT="Expand/Collapse Item"> </A>
Is there a way to add a tal:define on an onclick also? I need to define the following: tal:define="info python:here.userInfo(username)" but I want it defined in the on onclick as well.
A TAL define statement, as you can see in the order of operations section of the docs, is in scope for other statements in the same element. In other words, you can do your define and simply use 'info' in your attributes statement. Are you experiencing anything else? --jcc