Guest User

Untitled

a guest
Dec 14th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. single = function(){
  2. startdate = $("#from").val();
  3. enddate = $("#to").val();
  4. $.post("worker.php", { "startdate": startdate, "enddate": enddate },
  5. function(data) {
  6. $.each(data, function(key, value){
  7. appendstring = "<div class='item'>";
  8. appendstring += "<h3>" + key + "</h3>";
  9. appendstring += value[0] + "<br />";
  10. appendstring += value[1];
  11. appendstring += "</div>";
  12. $("#myTable").dataTable().fnAddData([
  13. key,
  14. value[0],
  15. value[1],
  16. "",
  17. ""
  18. ]);
  19. });
  20. }, "json");
  21. }
Add Comment
Please, Sign In to add comment