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

TypeError: c is undefined while saving a new entry using New Entry Form in DataTable

$
0
0

I have this table that displays a bootstrap modal with a form inside, when i fill this form and save my data or clicking to close modal, i want to refresh the data table but this caught and error:

 TypeError: c is undefined 

 ...dErrors";g[w0]("postSubmit",[c,n,j]);if(!c.error)c.error="";if(!c[(j4a+R6a+K8+i1...

on line 296 in dataTables.editor.min.js

this show this error when i refresh the ajax data, this is my code:

var editor;
var oTable;
function getStudentdetails(id) {
    editor = new $.fn.dataTable.Editor({  
       dom: "Tfrtip",
       table: "#table_student_details",   
       fields: [ {
              label: "Id:",
              name: "id",
              attr:  {
                 maxlength: 50,
                 name:"id",
                 placeholder: 'ID'
                    }
              }, {
            label: "Name:",
            name: "name"
            }
          ], 
         ajaxUrl: {
             "create":  "/addStudentdetails",
              "edit":   "/editStudentdetails",
              "remove": "/deleteStudentdetails"
               },

        });

   oTable = $('#table_student_details').DataTable({
       dom: "Tfrtip",
       destroy: true,
       ajax: {
           "url": url_prefix + "/getStudentDetails",
           "data": function(d) {
                d.id = id;
            }
         },
       tableTools: {
          sRowSelect: "os",
          aButtons: [{
            sExtends: "editor_create",
            editor: editor
            }, {
            sExtends: "editor_edit",
            editor: editor
            }, {
            sExtends: "editor_remove",
            editor: editor
          }]
     }
 });
}

I use the Files and versions and also in the below order:

    jquery-1.11.1.min.js
    jquery.dataTables.min.js-> 1.10.2
    dataTables.bootstrap.js
    dataTables.tableTools.min.js-->2.2.2
    dataTables.editor.min.js ->1.3.2

Somebody help me pls. I m struck with this for 5 days.


Viewing all articles
Browse latest Browse all 35289

Trending Articles