Button edit not working. Please, help me!

Button edit not working. Please, help me!

juliagsfjuliagsf Posts: 4Questions: 2Answers: 0
edited August 2016 in Free community support

I'm learning datatable, I'm doing a system using datatable but I have a problem that button edit not working.
This is my code:

<script>
var dataTable = $('#example').DataTable( {
"processing": true,
"serverSide": true,
"ajax":{
url :"test.php", // json datasource
type: "get", // method ,by default get
error: function(){ // error handling
$(".employee-grid-error").html("");
$("#employee-grid").append('<tbody class="employee-grid-error"><tr><th colspan="3">No registry</th></tr></tbody>');
$("#employee-grid_processing").css("display","none");
}
},
select: true,
dom: 'Blfrtip',
buttons: [
{
extend:'copy',
footer: false
},
{
extend: 'pdf',
footer: false
},
{
extend: 'csv',
footer: false
},
{
extend: 'excel',
footer: false
},
{
//THIS NOT WORKING!!!!!
extend: 'edit',
editor: editor
}
]
} );
</script>

And the plugin are:

    <link href="css/jquery.dataTables.min.css" rel="stylesheet" media="screen">
    <link rel="stylesheet" href="https://cdn.datatables.net/select/1.1.0/css/select.dataTables.min.css" type="text/css" />
    <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.1.0/css/buttons.dataTables.min.css" type="text/css"  />
    <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
    <script src="http://code.jquery.com/jquery-1.12.3.js"></script> 
    <script type="text/javascript" src="https://datatables.net/release-datatables/media/js/jquery.js"></script>
    <script type="text/javascript" src="https://datatables.net/release-datatables/media/js/jquery.dataTables.js"></script>
    <script type="text/javascript" scr="https://datatables.net/release-datatables/extensions/TableTools/js/dataTables.tableTools.js"></script>
    <script src="https://cdn.datatables.net/buttons/1.1.0/js/dataTables.buttons.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>
    <script src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js"></script>
    <script src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js"></script>
    <script src="https://cdn.datatables.net/buttons/1.1.0/js/buttons.html5.min.js"></script>
    <script src="https://cdn.datatables.net/select/1.2.0/js/dataTables.select.min.js"></script> 
    <script src="https://editor.datatables.net/extensions/Editor/js/dataTables.editor.min.js"></script>             
    <script src="https://cdn.datatables.net/buttons/1.2.1/js/dataTables.buttons.min.js"></script>   

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,208Questions: 1Answers: 10,415 Site admin

    Hi,

    If you have a look at the console in your browser it should be showing a warning stating that you cannot use the version of Editor which is hosted on editor.datatables.net on your own site. You need to download the trial which you can do so on the Editor download page.

    Regards,
    Allan

  • juliagsfjuliagsf Posts: 4Questions: 2Answers: 0

    So, I can't take plugin of my directory.. and i need to download the version of editor.datatables, ok? or i use of link the internet?

  • allanallan Posts: 63,208Questions: 1Answers: 10,415 Site admin
    Answer ✓

    Yes, you have to download Editor from the download page.

    Allan

  • juliagsfjuliagsf Posts: 4Questions: 2Answers: 0

    Ok Allan, thanks!!

This discussion has been closed.