I am a datatables newbie but hope someone can guide me in the right direction.
I am using makeeditable to generate a select box from a php function using loadurl which works just fine. The problem I am having is I need to send the id of the row to the function and I can't seem to figure out how to do it. I can create a static variable in loaddata but I can not set the value of a field to be the row id which is a hidden field in the datatable.
Thanks in advance for the guidance.
Jon
I am using makeeditable to generate a select box from a php function using loadurl which works just fine. The problem I am having is I need to send the id of the row to the function and I can't seem to figure out how to do it. I can create a static variable in loaddata but I can not set the value of a field to be the row id which is a hidden field in the datatable.
var exampleTable = $('#example').dataTable().makeEditable({ sUpdateURL: function(value, settings) { $.ajax({ type: "POST", url: "<?php echo site_url('quotes/ajax/edit_datatables');?>", data: "" success: function(){ oTable.fnDraw(); } }) return value; }, aoColumns: [ { }, { event: 'click', select: 'true' }, { }, { }, { }, { event: 'click', select: 'true' }, { onblur: 'submit', type : "select", loadurl: "<?php echo site_url('select/ajax/get_select');?>", loadtype: 'POST', loaddata: { "id": "2" }, // should be the value of the first datatable column which is a hidden column //loaddata: { "id": oTable.fnGetData(oTable.fnGetPosition(this)[0])[0].toString() }, event: 'click', select: 'true' }, { event: 'click', select: 'true' }, { }, ], });
Thanks in advance for the guidance.
Jon