function getProductFilterOptions(){ var opts = []; $checkboxes.each(function(){ if(this.checked){ opts.push(this.id); } }); return opts; } function updateProduct(opts){ $.ajax({ type: "POST", url: "submit.php", dataType : 'json', cache: false, data: {filterOpts: opts}, success: function(data){ $('#disp').html(makeTable(data)); $("#disp").table("refresh"); } }); } var $checkboxes = $("input:checkbox"); $checkboxes.on("change", function(){ var opts = getProductFilterOptions(); updateProduct(opts); }); updateProduct(); //dropdown(); $checkboxes.trigger("change");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)