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.
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.
Please refrain from correcting individuals' grammar faults. Not everyone reads/writes/speaks English perfectly as it is not their first or even their second language. Tolerance please. By the way, 'question sentences' is poor form. A more correct way of saying this would be, 'an interrogative sentence.' Also 'grammer' is actually spelled 'grammar'. - Asad Tino Wildenhain wrote:
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.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Asad Quraishi <aquraishi@skyesystems.com> JID: quad4b@jabber.skyesystems.org Skye Object Systems Inc. "...helping organizations build systems & software better" http://www.skyesystems.com
Please refrain from correcting individuals' grammar faults. Not everyone reads/writes/speaks English perfectly as it is not their first or even their second language. Tolerance please. By the way, 'question sentences' is poor form. A more correct way of saying this would be, 'an interrogative sentence.' Also 'grammer' is actually spelled 'grammar'.
Bah. Tolerance is fine, and personal attacks on someone for their use of a language they're still learning is bad, and nitpicking is generally tedious and annoying, but we should not hesitate to correct mistakes simply because the act is difficult. We do that for programming languages all the time here, and I see no reason not to do it for natural languages when mistakes get in the way of the actual programming or our communication about it. And I'm sure attitudes towards criticism differ, but I want to know when (and how) I'm butchering French whenever I try it. Seems to me the same would apply to someone as good with English as I am with French (which is to say terrible.) Proudly burning list karma on the altar of off-topic-ness, --jcc
hi Tino thanks for the response & for correcting me.but what will happen to the render part in the syntax? "replace -- with < & > --input type="text" name="t1" tal:content="structure python:form.t1.render(t1)" size="10" value="0" /-- " this will bring the field t1 from the formulator .now when i place the _javascript attribute called addition(t1).it doesn't work. i had actually written --input type="text" name="t1" tal:content="structure python:form.t1.render(t1)" size="10" value="0" /-- onfiltered="addition(t1.value,t2.value,t3)"-- --input type="text" name="t2" tal:content="structure python:form.t2.render(t2)" size="10" value="0" /-- onfiltered="addition(t1.value,t2,value,t3)"-- --input type="text" name="t3" tal:content="structure python:form.t3.render(t3)" size="10" -- t1,t2 (textfields )are defined in the formulator . how do i make it work? I actually understand that after rnning a file that takes elements from the formulator, it names it as field_t1,field_t2, is there any solution or alternative my actual requirement is that , using the values entered in t1 & t2 i shud add them & put in the text box t3 also defined in the formulator . my _javascript function states that <script type="text/_javascript"> function addition(arg1,arg2,arg3) { var added = parseInt(arg1) + parseInt(arg2); arg3.value = added; } plz help me thanks exteam --- Tino Wildenhain <tino@wildenhain.de> wrote: > 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.
________________________________________________________________________ Send free SMS using the Yahoo! Messenger. Go to http://in.mobile.yahoo.com/new/pc/
hi sorry that is not onfiltered but it is onchange. thanks exteam Exteam <exteam6@yahoo.co.in> 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 using the Yahoo! Messenger; Download latest version. SMS using the Yahoo! Messenger;Download latest version.
Hi Exteam In the footer of every mail from the zope lists, you may see this sentence: ** No cross posts or HTML encoding! ** So please: no cross posts or HTML encoding. Regarding your question. You send code like: """ <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)" """ It looks as though you want to use TAL-defined variables (t1, t2, t3) in your javascript. This is how to do that: """ <input type="text" name="t1" onchange="replaced by TAL" tal:attributes="onchange string:addition(${t1}.value, ${t2}.value, ${t3})" """ -- Jean Jordaan http://www.upfrontsystems.co.za
hi jean thanks for the response.but what will happened to the render part in the "replace -- with < & > --input type="text" name="t1" tal:content="structure python:form.t1.render(t1)" size="10" value="0" /-- " this will bring the field t1 from the formulator .now when i place the javascript attribute called addition(t1).it doesn't work. i had actually written --input type="text" name="t1" tal:content="structure python:form.t1.render(t1)" size="10" value="0" /-- onchange="addition(t1.value,t2.value,t3)"-- --input type="text" name="t2" tal:content="structure python:form.t2.render(t2)" size="10" value="0" /-- onchange="addition(t1.value,t2,value,t3)"-- --input type="text" name="t3" tal:content="structure python:form.t3.render(t3)" size="10" -- t1,t2 (textfields )are defined in the formulator . how do i make it work? I actually understand that after rnning a file that takes elements from the formulator, it names it as field_t1,field_t2, is there any solution or alternative my actual requirement is that , using the values entered in t1 & t2 i shud add them & put in the text box t3 also defined in the formulator . my javascript function states that <script type="text/javascript"> function addition(arg1,arg2,arg3) { var added = parseInt(arg1) + parseInt(arg2); arg3.value = added; } plz help me thanks exteam Jean Jordaan <jean@upfrontsystems.co.za> wrote: Hi Exteam In the footer of every mail from the zope lists, you may see this sentence: ** No cross posts or HTML encoding! ** So please: no cross posts or HTML encoding. Regarding your question. You send code like: """ t2 request/t2|nothing; t3 request/t3|nothing"> [input] onchange="addition(t1.value,t2.value,t3)" """ It looks as though you want to use TAL-defined variables (t1, t2, t3) in your javascript. This is how to do that: """ [input] onchange="replaced by TAL" tal:attributes="onchange string:addition(${t1}.value, ${t2}.value, ${t3})" """ -- Jean Jordaan http://www.upfrontsystems.co.za _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev SMS using the Yahoo! Messenger;Download latest version.
participants (5)
-
Asad Quraishi -
Exteam -
J Cameron Cooper -
Jean Jordaan -
Tino Wildenhain