Fiqhi Posted February 28, 2014 Share Posted February 28, 2014 function checker(file,type) { var mail_tot; alert("Step 1"); $("input[name='mchk[]']:checked").each(function() { alert("Step 2"); var sel_mail=$(this).val(); if((mail_tot=='')||(mail_tot=='undefined')){ mail_tot = sel_mail; }else{ mail_tot = sel_mail+','+mail_tot; } }); var a=$.get("invite_stat.php", { mail_tot:mail_tot,type:type}, function(data){ ShowSearch('',file); } ); } When i execute that script popup "Step 1" shows up. but Step 2 didn't I need that function to retrieve value of checked checkbox <input id="mchk" name="mchk" type="checkbox" value="86"> <input id="mchk" name="mchk" type="checkbox" value="85"> Link to comment https://forums.phpfreaks.com/topic/286595-cant-get-checked-value-of-checkbox/ Share on other sites More sharing options...
requinix Posted February 28, 2014 Share Posted February 28, 2014 Well, your is still named "mchk" and not "mchk[]" as you have in the selector... Link to comment https://forums.phpfreaks.com/topic/286595-cant-get-checked-value-of-checkbox/#findComment-1471007 Share on other sites More sharing options...
Fiqhi Posted February 28, 2014 Author Share Posted February 28, 2014 Well, your <input> is still named "mchk" and not "mchk[]" as you have in the selector... well thx mate. didn't see that Link to comment https://forums.phpfreaks.com/topic/286595-cant-get-checked-value-of-checkbox/#findComment-1471009 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.