Jump to content

Can't get checked value of checkbox


Fiqhi

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.