[Zope] passing ZPT variables to Javascript
Karen Yang
chefky77@yahoo.com
Sat, 12 Oct 2002 09:27:01 -0700 (PDT)
--0-1069856515-1034440021=:86254
Content-Type: text/plain; charset=us-ascii
If I defined variables in my ZPT using tal:define, how do I pass these variables to a javascript function without getting an error?
My attempt (obviously wrong):
<td tal:define="itemId item/id; code item/code">
<a style="color:dodgerblue"
tal:define="url string:${request/URL1}/processDeleteItem?itemId:int=$itemId&code=$code"
href="javascript:doNothing()" onClick="javascript:confirmDelete('string:$code', 'string:$url')"><img src="/ItemManager/images/delete_icon" border="0"></a>
</td>
Thanks,
Karen
---------------------------------
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com
--0-1069856515-1034440021=:86254
Content-Type: text/html; charset=us-ascii
<P>If I defined variables in my ZPT using tal:define, how do I pass these variables to a javascript function without getting an error? </P>
<P>My attempt (obviously wrong):<BR><FONT color=#0000ff> <td tal:define="itemId item/id; code item/code"><BR> <a style="color:dodgerblue"<BR> tal:define="url string:${request/URL1}/processDeleteItem?itemId:int=$itemId&code=$code"<BR> href="javascript:doNothing()" <FONT color=#ff0000>onClick="javascript:confirmDelete('string:$code', 'string:$url')"</FONT>><img src="/ItemManager/images/delete_icon" border="0"></a><BR> </td></FONT><BR> </P>
<P>Thanks,</P>
<P>Karen</P><p><br><hr size=1>Do you Yahoo!?<br>
<a href="http://faith.yahoo.com">Faith Hill</a> - Exclusive Performances, Videos, & more<br>
<a href="http://faith.yahoo.com">faith.yahoo.com</a>
--0-1069856515-1034440021=:86254--