Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35278

Standalone Edit doesn't fill the document and won't update

$
0
0

I am trying to use the stand alone editor and it doesn't seem to work correctly. I have the data-editor-field located in the html and then I call the script to initiate a new editor. But it doesn't update the html data. If I place data in the fields and click on the edit button, it populates the edit dialog, but won't save because it has no row id.

I have tried both on document ready, as well as my typical load js file and call the function DetailsTable. I know the file is loading and it is initializing. It just isn't updating the html.

I have also checked and it never accesses the php script during initialization. It does when I submit the update though. Am I doing something wrong or is the standalone editing not working?

                    <div class='row'>
                        <label class='control-label col-xs-6'>Type:</label>
                        <div class='col-xs-6' ><a data-editor-field="useCode"></a></div>
                    </div>

function DetailsTable(){ var editor = new $.fn.DataTable.Editor( { ajax: "datatables/tables/php/table.details.php", fields: [ { label: "Code", name: "useCode", type: "text" } ] } ); // Edit record $('#edit').on('click', function () { editor .title( 'Edit' ) .buttons( { "label": "Update", "fn": function () { this.submit() } } ) .edit(); } ); }

Viewing all articles
Browse latest Browse all 35278

Trending Articles