Call CI controler functiona from View using ajax
Here is simple function through you can call controller function from view using ajax
$.ajax({
type: "POST",
async:false,
url: '<?php echo base_url('admin/editmodule')?>',
data: {'id':id,'modulename':modulename},
success: function(msg) {
alert('Module edited');
$('#modulename_'+id).text(modulename);
}
});
type: "POST",
async:false,
url: '<?php echo base_url('admin/editmodule')?>',
data: {'id':id,'modulename':modulename},
success: function(msg) {
alert('Module edited');
$('#modulename_'+id).text(modulename);
}
});
Comments
Post a Comment