Updating and deleting???

Updating and deleting???

btvbillbtvbill Posts: 11Questions: 0Answers: 0
edited December 2011 in General
I've got a couple different functions in my datatables that work if I remove one or the other. The following code will update my database after adding and deleting:
[code]

$(document).ready( function () {
var oTable = $('#example').dataTable().makeEditable({
sUpdateURL: "UpdateData.cfm",
sAddURL: "AddData.cfm",
sDeleteURL: "DeleteData.cfm"
});
} );

[code]

...and this will refresh my page IF I remove the above code:
[code]

var oTable;
$(document).ready(function() {
oTable = $('#example').dataTable();
/* Re-draw the table - you wouldn't want to do it here, but it's an example :-) */
oTable.fnDraw();
} );

[/code]

How can I combine these functions together so that I can add, delete and update my database AND have the page refresh afterwards? Thanks.

Replies

  • btvbillbtvbill Posts: 11Questions: 0Answers: 0
    Actually, the second part does not refresh the page. It was my CF code that was doing it. Seems like all these new ways of presenting tables look great but the tutorials are a bit sporadic and lacking.
  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    The editable plug-in doesn't form part of the DataTables core software - its 3rd party software, so there is no documentation for how to use it on this site (issues and requests can be raised on its own site: http://code.google.com/p/jquery-datatables-editable/).

    If you have any suggestions on how to improve the DataTables documentation then I'm all ears!

    Ultimately I will be looking at writing a editing plug-in for DataTables that will form part of the core project and thus get documented as such, but part of the issue with that is that there are about a million ways to present the editing and its all heavily dependent on the server-side environment as well - something I absolutely do not want to dictate.

    Allan
This discussion has been closed.