var commissionIdValues = new Array();

 $("."+input_class_name).each( function() {
  var val =  $(this).val();
 commissionIdValues.push(val);
 });
var commission_ids = commissionIdValues.toString();

################## OR ############################


$(function(){
  $('#btnClick').click(function(){
    var val = [];
    $(':checkbox:checked').each(function(i){
      val[i] = $(this).val();
    });
  });
});

http://trentrichardson.com/2009/01/08/getting-a-list-of-checkbox-values-with-jquery/

Advertisements