Quantcast
Viewing all articles
Browse latest Browse all 82150

jQuery $.load() function trigger datatables error

when i click a datatable row button to Edit that row, i'm populating a form with the row's data by using $.load(FORM_PAGE_URL_HERE). But when i click on the Edit button, i'm getting this error:

-------------------------------------
CLICK FUNCTION
-------------------------------------
$('#doctors-table').on('click', 'td a.edit', function(e) {

e.preventDefault();

$('#edit-form'').load('FORM_PAGE_URL', function() {
$(this).fadeIn();
});

});


-------------------------------------
ERROR
-------------------------------------
DataTables warning (table id = 'doctors-table'): Cannot reinitialise DataTable.

To retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy

Viewing all articles
Browse latest Browse all 82150

Trending Articles