is there a way to run some python db.update code in a view by using the onclick event from the checkbox. At present the python code just runs, I put the "checker" in there to try and toggle it off until the onclick event obviously does not run the python code as is. help appreciated chrism
<table width="100%" cellpadding="1" cellspacing="0" border="0" class="display" id="example"> <thead> <tr> <th>Part Name</th><th>Content</th><th>Number</th><th>Created On</ th> </tr> </thead> <tfoot> <tr> <th>Part Name</th><th>Content</th><th>Number</th><th>Created On</ th> </tr> </tfoot> <tbody> {{for part in parts:}} {{checker=0}} <tr> <td>{{=part.part_name}}</td> <td>{{=part.part_content}}</td> <td>{{=part.part_number}}</td> <td>{{=part.timestamp.year}}</td> <td class="center"><input type="checkbox" name="check_" value="{{part.id}}" onclick="{{if not checker==0:}} {{=db.prodj_refs.insert(prodj_id=prodj.id,part_id=part.id)}} {{pass}}"></td> </tr> {{pass}} {{checker=1}} {{pass}} </tbody> </table> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---