First i have a HTML Formular: ----------------------------- <table border="0" align="center" width="800" height="450" bgcolor="#999999"> <tr bgcolor="#003366" align="left"> <td height="1" valign="top" bgcolor="#999999"> </td> </tr> <tr bgcolor="#CCCCCC" align="left"> <td valign="top" bgcolor="#CCCCCC"> <p> </p> <form name="form1" method="post" action="arten_uebertragen"> <table width="700" border="0" align="center"> <tr bgcolor="#999999"> <td colspan="2">Art</td> <td width="386"> </td> </tr> <dtml-in get_arten_tabelle> <tr> <td width="24"> <input name="id_art:list" type="checkbox" value="<dtml-var id_art_auswahl>"> </td> <td width="276"><dtml-var id_art_auswahl>. <dtml-var gruppierung></td> <td> </td> </tr> </dtml-in> <tr> <td colspan="2" bgcolor="#999999">neue Art:</td> <td bgcolor="#999999"><dtml-in get_arten_max> <input type="hidden" name="id_art" value="<dtml-var expr="id_art_max+1"> "></dtml-in> <input type="text" name="gruppierung"> </td> </tr> <tr> <td colspan="2"> <input name="Submit" type="submit" value="änderung übernehmen"></td> <td> </td> </tr> </table> </form> </td> </tr> </table> Second the SQL File "arten_delete": ----------------------------------- DELETE FROM arten_tabelle WHERE id_art=<dtml-sqlvar id_art type="int">; and third the submit File to the SQL File: ------------------------------------------ <dtml-in get_arten_tabelle> <dtml-if expr="id_art[1]==id_art_auswahl"> <dtml-call arten_delete> </dtml-if> </dtml-in> "arten_tabelle" returns a list of numbers in "id_art_auswahl". How do I programm a routine...that interprets the Checkbox-returnlist of id_art to compare it with "id_art_auswahl"? Thanks...Florian Fischer
On 15 May 2002 florian@fischer.tc wrote:
First i have a HTML Formular: ----------------------------- As a colleague of Florian I try to clarify the question a little bit more abstract:
There is a list of checkbox entries and he wants to iterate over each marked entry. Assume you are in a normal Zope folder, mark some objects and press delete button. This is exactly what Florian tries to do except that the deletion has to be performed at some rows in a SQL database and the Id of those rows is presented as list of checkboxes. Thanks four your help Andreas.
"Tille, Andreas" wrote:
On 15 May 2002 florian@fischer.tc wrote:
First i have a HTML Formular: ----------------------------- As a colleague of Florian I try to clarify the question a little bit more abstract:
There is a list of checkbox entries and he wants to iterate over each marked entry. Assume you are in a normal Zope folder, mark some objects and press delete button. This is exactly what Florian tries to do except that the deletion has to be performed at some rows in a SQL database and the Id of those rows is presented as list of checkboxes.
Thanks four your help
Andreas.
florian@fischer.tc wrote: Second the SQL File "arten_delete": ----------------------------------- DELETE FROM arten_tabelle WHERE id_art=<dtml-sqlvar id_art type="int">;
and third the submit File to the SQL File: ------------------------------------------ <dtml-in get_arten_tabelle>
<dtml-if expr="id_art[1]==id_art_auswahl"> <dtml-call arten_delete> </dtml-if>
</dtml-in>
"arten_tabelle" returns a list of numbers in "id_art_auswahl"._
<dtml-call "delete_auswahl(auswahl=id_art_auswahl)"> DELETE FROM arten_tabelle WHERE id_art IN (<dtml-var "_.string.join(auswahl,',')">) UNTESTED !!! -- _______________________________________________________________________ Andreas Heckel andreas@easyleading.org
participants (3)
-
Andreas Heckel -
florian@fischer.tc -
Tille, Andreas