[Zope] javascript and ZPT
eugen@sifolt.ro
eugen@sifolt.ro
Wed, 18 Dec 2002 14:39:16 +0200
Here is a snippet from my template:
......
<td><input type="checkbox" name="c_row" tal:attributes="value row/id"></td>
......
<a href="" onclick="document.forms[0].c_row.checked = true; for(i=0;
i<document.forms[0].c_row.length; i++) { document.forms[0].c_row[i].checked =
true; } return false">Select all</a>
<a href="" onclick="document.forms[0].c_row.checked =
!document.forms[0].c_row.checked; for(i=0; i<document.forms[0].c_row.length;
i++) { document.forms[0].c_row[i].checked = !document.forms[0].c_row[i].checked;
} return false">Invert selection</a><br>
.......
This works well but I need c_row to be passed as a list of integers. In this
form it is passed as a string or list of strings.
A good replacement I tought to be the follow one:
......
<td><input type="checkbox" name="c_row:list:int" tal:attributes="value
row/id"></td>
......
but in this case I dont now how to handle javascript.
Any help would be appreciated! TNX.
---------------------------------------------------------------------------
This message (including any attachments) is confidential and may be
privileged. If you have received it by mistake please notify the sender
by return e-mail and delete this message from your system.
Any unauthorised use or dissemination of this message in whole or in part
is strictly prohibited. Please note that e-mails are susceptible to change.
S.I.F. Oltenia S.A. shall not be liable for the improper or incomplete
transmission of the information contained in this communication nor for
any delay in its receipt or damage to your system.
S.I.F. Oltenia S.A. does not guarantee that the integrity of this
communication has been maintained nor that this communication is free of
viruses, interceptions or interference.
---------------------------------------------------------------------------