var exoTable;
exoTable = $('#examples').dataTable({ bJQueryUI: true,
"bProcessing": true,
"bRetrieve": true,
"bServerSide": true,
"sAjaxSource": "xxxx.action?",
"sPaginationType": "full_numbers",
"aoColumns": [
{ "sName": "DRUGCODE",
"bSearchable": false,
"bSortable": false
},
{ "sName": "COMPANY_NAME" },
{ "sName": "ADDRESS"},
{ "sName": "TOWN" }]
}).makeEditable({
sUpdateURL : "xxxx.action,
"aoColumns": [
null,
null,
{
indicator: 'Saving...',
tooltip: 'Click to select town',
loadtext: 'loading...',
type: 'select',
onblur: 'submit',
data:
},
{
indicator: 'Saving...',
tooltip: 'Click to edit',
loadtext: 'loading...',
type: 'text',
onblur: 'submit'
}
],
sAddURL: "XXX.action",
sAddHttpMethod: "GET",
sDeleteHttpMethod: "GET",
sDeleteURL: "XXX.action",
fnOnEditing: function(input)
{
input.val(encodeURI(input.val()));
return true;
},
oAddNewRowButtonOptions: { label: "Add...",
icons: {primary:'ui-icon-plus'}
},
oDeleteRowButtonOptions: { label: "Remove",
icons: {primary:'ui-icon-trash'}
},
oAddNewRowFormOptions: {
title: 'Add a new browser',
show: "blind",
hide: "explode",
modal: true
} ,
sAddDeleteToolbarSelector: ".dataTables_length"});
after this ,exoTable.fnReloadAjax( "xxxx.action");,but it does not work.
"sAjaxSource":xxxx.action?presc_code=xxx"I mean, when i click a button ,the "sAjaxSource" params after the url changed. Sometimes,Allan answer ""
fnServerData": function ( sSource, aoData, fnCallback ) {
/* Add some extra data to the sender */
aoData.push( { "presc_code=": "0001"} );
$.getJSON( sSource, aoData, function (json) {
/* Do whatever additional processing you want on the callback, then tell DataTables */
fnCallback(json);
} );
}",
but how to change the extra data? who can help me? I want to change the "presc_code=" value when i click a button or change a select. It looks like you're new here. If you want to get involved, click one of these buttons!
Get useful and friendly help straight from the source.