dataSrc not work? did i do something wrong?

dataSrc not work? did i do something wrong?

liwahadriliwahadri Posts: 2Questions: 1Answers: 0
edited August 2022 in Free community support

hi i have a problem in 'dataSrc' that the information does not exist in the columns although I am sure of this path It stays on loading in a table

the arrays that i have in log

      $('#table').DataTable({
        "ajax":{
          "url" : "https://******************?page=",
          "dataSrc": "data",
          "success" : function (data) {
            console.log(data);
          },
          "error" : function(err) {
            console.log(err);
          }
        },
        columns: [
          { data: 'title' },
        ],
        "lengthMenu": [ 5, 10],
        "pageLength": 5,
        "lengthChange" : false,
        "pagingType": "simple_numbers",
      });

Answers

  • liwahadriliwahadri Posts: 2Questions: 1Answers: 0

    nvm i'v fixed it. i have a question and i wondering if it is possible how i pass variable from dataSrc and then send it to the column?

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    I'm not sure what you mean. What is the intention with that variable?

    Allan

Sign In or Register to comment.