Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

106
Views
JS Datatable no muestra la respuesta AJAX

Datatable no muestra la respuesta de una llamada AJAX al backend del matraz.

Los datos se recuperan como puedo verlos en la console.log del campo de success de la llamada AJAX, sin embargo, no se completa en la tabla.

Aquí está el JSON:

 {'events': [ { 'TIME': 'Evening', 'DESCRIPTION': 'test1' }, { 'TIME': 'Morning', 'DESCRIPTION': 'test2' } ] }

Esta es la parte JS:

 function load_table() { var payload = {'from_date': $('#from_date').val(), 'to_date': $('#to_date').val()} $('#table').DataTable({ pageLength: 50, paging: true, ajax: { url: "data/get-events/" + JSON.stringify(payload), dataType: "json", type: 'GET', error: function(e){ alert(e); }, success: function(e){ console.log(e); }, dataSrc: 'events' }, columns: [ { title: 'Time', data: 'TIME'}, { title: 'Event', data: 'DESCRIPTION'} ], bDestroy: true, }); }

Probé las decenas de respuestas a mi pregunta similar, pero ninguna funcionó.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!