[Zope] javascript & zpt

Exteam exteam6@yahoo.co.in
Mon, 7 Jul 2003 12:06:59 +0100 (BST)


--0-1330578469-1057576019=:31083
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


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 using the Yahoo! Messenger;Download latest version.
--0-1330578469-1057576019=:31083
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<P>HI <BR>i have a zpt file like this<BR>&lt;div metal:define-macro="f1a_macro"&gt;</P>
<P>&lt;form name="f1a0" method="post" action="f1a_redirect"&gt;</P>
<P>&lt;table tal:define="form here/f1a0" align=center border="1" width="380" height="628"&gt;</P>
<P>&lt;tr tal:define="t1 request/t1|nothing; t2 request/t2|nothing; t3 request/t3|nothing"&gt;</P>
<P>&lt;td width="14%"&gt; &lt;input type="text" name="t1" onchange="addition(t1.value,t2.value,t3)"</P>
<P>tal:replace="structure python:form.t1.render(t1)" size="10" value="0" /&gt;</P>
<P>&lt;/td&gt;</P>
<P>&lt;td width="14%"&gt; &lt;input type="text" name="t2" onchange="addition(t1.value,t2.value,t3)"</P>
<P>tal:replace="structure python:form.t2.render(t2)" size="10" value="0" /&gt;</P>
<P>&lt;/td&gt;<BR>&lt;td width="14%"&gt; &lt;input type="text" name="t3" <BR>tal:replace="structure python:form.t3.render(t3)" size="10" value="0" /&gt;</P>
<P>&lt;/tr&gt;</P>
<P>&lt;script language="JavaScript"&gt;</P>
<P>function addition(arg1,arg2,arg3) </P>
<P>{</P>
<P>var added = parseInt(arg1) + parseInt(arg2);</P>
<P>arg3.value = added;</P>
<P>}</P>
<P>&lt;/script&gt;</P>
<P>&lt;/form&gt;</P>
<P>&lt;/div&gt;</P>
<P>&nbsp;</P>
<P>but this is not working ,</P>
<P>what is the problem.</P>
<P>my reqiurement is very simple</P>
<P>ihave defined these textfields (t1,t2,t3)in formulator.</P>
<P>what is the problem,<BR>plz help me</P>
<P>thanks</P>
<P>exteam</P><p><font face=arial size=-1><img src="http://in.yimg.com/i/in/mobile/pctomob.gif" width=28 height=22 border=0 alt="Yahoo! India Mobile"></a>
<a href="http://in.mobile.yahoo.com/new/pc/" target="_blank"><b>SMS</b></a> using the Yahoo! 
<a href="http://in.mobile.yahoo.com/new/pc/"><b>Messenger</a>;</b></font>
<font face=arial size=-1><b>
<a href="http://in.messenger.yahoo.com/">Download</b></a> latest version.</font>
--0-1330578469-1057576019=:31083--