I'm working with jEdtable and would like to add 2 more parameters into the posted URL. Is there a way to accomplish this?
Here's the default parameters -
$(document).ready(function() {
$('.edit').editable('http://www.example.com/save.php', {
id : 'elementid',
name : 'newvalue'
});
});
But I would like to add pageName
to as parameter which will be posted along with the id
and name
.
I tried something like this
$(document).ready(function() {
$('.edit').editable('http://www.example.com/save.php', {
id : 'elementid',
name : 'newvalue',
pageName: 'story'
});
});
But on the save.php page, pageName is not being displayed. Any help would be appreciated.
I think you can use submitData (look at this link under "Parameter reference")
"submitdata": function ( value, settings ) {
return {
"pageName": 'story',
"column": '3'
};
},
Basically you can specify other parameters that will be sent to the server
You can use the Editable's oUpdateParameters property
$('#datatable').dataTable().makeEditable({
sUpdateURL: 'update.php',
oUpdateParameters: {
timeOfUpdate: function () {
return Date.now();
}
}
});