Posted By

tuffo19 on 11/20/10


Tagged

form js jquery checkbox


Versions (?)

Jquery seleziona checkboxes


 / Published in: JavaScript
 

Giorgio fecit. Serve per controllare, a partire da un checkbox, che non ne siano selezionati altri nella stessa riga.

  1. $(document).ready(function (){
  2. $("tr[class=check_unique]").each(function (){
  3. $(this).find("input[type=checkbox]").each(function(){
  4. var selected_name=$(this).attr("name");
  5. $(this).click(function (){
  6. $(this).parents("tr[class=check_unique]").find("input[type=checkbox]").each(function (){
  7. var curr_name=$(this).attr("name");
  8. if(selected_name!=curr_name)document.forms['FORM_INSERT_CENTRI'].elements[curr_name].checked=false;
  9. });
  10. });
  11. });
  12. });
  13. }
  14. );

Report this snippet  

You need to login to post a comment.