I have a view having multiple checkboxes.
When I select some textbox, I need to do some operation on them, so they should be passed to the controller.
How can I do this?
My JS function :
function myfun() {
$.ajax({
type : "POST",
url : "http://localhost/newtemplate/index.php/product/dispatchdata/",
dataType : 'json',
data : {
idList : $("input[type=checkbox]:checked").serializeArray()
},
success : function(data) {
alert(data);
},
error : function (data){
alert('Error');
//alert(data);
}
});
}
dispatcher.phpis right ? what is the error that you got ?