press on checkbox execute python script
Hi, When the checkbox is selected I want to execute the Python script getSelection. The id of the file should then be added to myList for further processing. However when I look into myList nothing is changed. <form action="." method="post"> <dtml-in expr="getFiles()" > <input type="checkbox" name="getSelection(id)" value="id" > <a href=<dtml-var expr="getLink(id)"> /a><dtml-var id><BR> </dtml-in> </form> parameter= file session=context.REQUEST.SESSION l=session.get("myList", []) l.append(file) session["myList"]=l What is wrong ? Kind regards. Michael
On Thu, 2003-10-09 at 09:02, Michael Bleijerveld wrote:
<input type="checkbox" name="getSelection(id)" value="id" >
When something isn't working the way you expect, look at the code behind what the template generates. This one should be pretty obvious, as all your checkboxes are named "getSelection(id)". You probably wanted to use <dtml-var "getSelection(id)"> instead. HTH, Dylan
participants (2)
-
Dylan Reinhardt -
Michael Bleijerveld