jEditTable Post to Server
jEditTable Post to Server
I didn't see a good example of how to post changes using jEditTable. Below is my code. If anyone can suggest a better way to do it, I'd appreciate. A working example on the web can be found here.
http://www.theateronline.com/jqjEditAbleDataTable.xzc
$(document).ready(function() {
$('td.name').editable('./jqjEditableDataTable.xzc', {
name:'name'
});
$('td.state').editable('./jqjEditableDataTable.xzc', {
loadurl: './jqEditableST.xzc',
type : 'select',
submit : 'OK'
});
$('#myexample').dataTable();
});
Question Set Label
Library Department
13th Street Repertory
NY
29th Street Rep
NY
45 Below
NY
http://www.theateronline.com/jqjEditAbleDataTable.xzc
$(document).ready(function() {
$('td.name').editable('./jqjEditableDataTable.xzc', {
name:'name'
});
$('td.state').editable('./jqjEditableDataTable.xzc', {
loadurl: './jqEditableST.xzc',
type : 'select',
submit : 'OK'
});
$('#myexample').dataTable();
});
Question Set Label
Library Department
13th Street Repertory
NY
29th Street Rep
NY
45 Below
NY
This discussion has been closed.
Replies
Did you see this example: http://www.datatables.net/examples/example_editable.html
The problem with what you have at the moment is that it isn't updating DataTables with the new data, so the search etc will use using the old data. The example above shows how it might be used while updating DataTables. Note that you will need to make the Ajax call to the server yourself using this method (not sure if jEditable can be made to still post to the server when using a callback function - possibly...).
Allan