[Zope] javascript & zpt

Tino Wildenhain tino@wildenhain.de
Mon, 07 Jul 2003 13:18:14 +0200


Hi Exteam,

try to lookup the word "replace" (from tal:replace)
in your favourite english language dictionary :-)
This should clarify why it does "not work".

Consider a glance to the grammer section too,
since it is a bit errr... irritating to read
question sentences ending with a period.

Regards
Tino

Exteam wrote:
> HI
> i have a zpt file like this
> <div metal:define-macro="f1a_macro">
> 
> <form name="f1a0" method="post" action="f1a_redirect">
> 
> <table tal:define="form here/f1a0" align=center border="1" width="380" 
> height="628">
> 
> <tr tal:define="t1 request/t1|nothing; t2 request/t2|nothing; t3 
> request/t3|nothing">
> 
> <td width="14%"> <input type="text" name="t1" 
> onchange="addition(t1.value,t2.value,t3)"
> 
> tal:replace="structure python:form.t1.render(t1)" size="10" value="0" />
> 
> </td>
> 
> <td width="14%"> <input type="text" name="t2" 
> onchange="addition(t1.value,t2.value,t3)"
> 
> tal:replace="structure python:form.t2.render(t2)" size="10" value="0" />
> 
> </td>
> <td width="14%"> <input type="text" name="t3"
> tal:replace="structure python:form.t3.render(t3)" size="10" value="0" />
> 
> </tr>
> 
> <script language="JavaScript">
> 
> function addition(arg1,arg2,arg3)
> 
> {
> 
> var added = parseInt(arg1) + parseInt(arg2);
> 
> arg3.value = added;
> 
> }
> 
> </script>
> 
> </form>
> 
> </div>
> 
>  
> 
> but this is not working ,
> 
> what is the problem.
> 
> my reqiurement is very simple
> 
> ihave defined these textfields (t1,t2,t3)in formulator.
> 
> what is the problem,
> plz help me
> 
> thanks
> 
> exteam
> 
> *SMS* <http://in.mobile.yahoo.com/new/pc/> using the Yahoo! *Messenger* 
> <http://in.mobile.yahoo.com/new/pc/>*;* * Download 
> <http://in.messenger.yahoo.com/>* latest version.
>