DataTables does not complete

DataTables does not complete

FicosFicos Posts: 88Questions: 22Answers: 0

I am getting an error when displaying DataTables. Debugger code: ujipef
See https://www.ficos.nl/oostveen-advies/testajaxdatatable/index.html
What have I done wrong? The tables are ok, json is returning nice answers.

Jan

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,824Questions: 1Answers: 10,131 Site admin

    Hi Jan,

    You are using objects in your data source, therefore you need to tell DataTables which property to read for each column. That can be done with columns.data. See the manual for more details.

    Allan

  • FicosFicos Posts: 88Questions: 22Answers: 0

    Thank you. Putting in the columns solves the problem, but putting in

     data: data,
     columns: [
              { data: 'CODE' },
              { data: 'OMSCHRIJVING' }
            ]
    

    doesn't load the table. Debugcode: ubevog

  • allanallan Posts: 61,824Questions: 1Answers: 10,131 Site admin
    Answer ✓

    There is a Javascript error on your page:

    Uncaught ReferenceError: data is not defined
    

    which is correct - it isn't :-). Looks like you just need to remove that line.

    Allan

  • FicosFicos Posts: 88Questions: 22Answers: 0

    Right, thank you.

This discussion has been closed.