How to call controller/action in zend framework via jquery/ajax?
I tried this
<script>
$(function() {
$(".tbl_repeat tbody").tableDnD({
onDrop: function(table, row) {
var orders = $.tableDnD.serialize();
$.post("<?php echo $this->baseUrl();?>/Indexcodelist/indexcodelistsearch/",{order : orders });
}
});
});
</script>
this code isn't calling the controller's action method, how do i achieve it?
Problem occurred that we have to use single or double quotes when giving the name of passing data in $.post(...)
or $.ajax(...)
otherwise it interpret it as an javascript object not a name.
$.post("<?php echo $this->baseUrl();?>/Indexcodelist/indexcodelistsearch/",{'order':orders});
^-----^
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With