I have a table with checkboxes next to them. Pretty much like this google 
group. The idea is once a checkbox is selected and someone click the submit 
form (like attach pic), the post is saved under users name and I do that in 
the controller "save_post". 

 I have put this to the table ( inside my view). 

<td><input type="checkbox" id="select_this" value="on" /></td>

at the bottom I have

<form enctype="multipart/form-data" action="{{=URL('save_post',args=1)}}" 
method="post">
<input type="submit" />
</form>

I have the submit button and I can pass the variable (args=1) to 
"save_post". But how do I change args=1 to post.id if the user select that 
checkbox? I am assuming I need a JQuery similar to below but can't seem to 
put them (submit and checkbox) together. Any help?



<script>
jQuery("#select_this").click(function() {
     var checkedStatus = this.checked;
     jQuery("input[type=checkbox]").each(function() { this.checked = 
checkedStatus; });
});
</script>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to