SHARE
TWEET

Untitled

a guest Jun 27th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Load(); function
  2. var a1 = data[0].A1;
  3. var a2 = data[0].A2;
  4.  
  5. var htmlCode += '<tr><td>' + a1 + '</td><td>' + a2 + '</td></tr>';
  6. $('#TableBody').html(htmlCode);
  7. var table = $('#Tabla').DataTable({
  8.     aLengthMenu: [
  9.         [10, 25, 50, 100, -1],
  10.         [10, 25, 50, 100, "All"]
  11.     ],
  12.     "bDestroy": true,
  13.     "aaSorting": [],
  14.     iDisplayLength: 10,
  15. });
  16.      
  17. var interval = setInterval(function () {
  18.     table.page(pageAc).draw('page');
  19.  
  20.     if (TotalPage === 1) {
  21.         table.page('first').draw('page');                                        
  22.         timesReturned++;
  23.         pageAc = 0;      
  24.         clearInterval(interval);
  25.         //CallWebService and redraw table with all above code
  26.         Load();
  27.     }
  28.  
  29.     if (pageAc === pageInfo.pages) {
  30.         table.page('first').draw('page');
  31.         timesReturned++;
  32.         pageAc = 0;
  33.         clearInterval(interval);
  34.     }
  35.     pageAc++;
  36. }, 10000);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top