Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

set datatable with jquery success return value

  success: function(respone){
              table.destroy(); //destruy allow to reinitialize
              const res = JSON.parse(respone); // parse if got encode in server
              const response_object = res.data; 
    // data:{['record','record'],['record','record']...}	

              console.log(response_object);

              $('#table_id').DataTable( {
                data: response_object,
               // datatablesetting....
            } );
            }
 
PREVIOUS NEXT
Tagged: #set #datatable #jquery #success #return
ADD COMMENT
Topic
Name
6+3 =