Guest User

Untitled

a guest
Oct 23rd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. if(result.rows.length == 0)
  2. output = "<em>There are no records to display!</em>";
  3. else
  4. {
  5. output += "<table border='1' width='80%'>";
  6.  
  7. var noOfRows = result.rows.length;
  8.  
  9. for(var i = 0, row = null; i < noOfRows; i++)
  10. {
  11. //assign row to a variable
  12. row = result.rows.item(i);
  13. //process each record
  14. output += "<tr>";
  15.  
  16.  
  17. output += "<td>" + row['fldName'] + ""
  18. output += " " + row['fldNoOfPeople'] + ""
  19. output += " " + row['fldType'] + ""
  20. output += " " + row['fldLevel'] + ""
  21. output += " " + row['fldCamera'] + "</td>"
  22. output += "</tr>";
  23.  
  24. }
  25. output += "</table>";
  26. }
  27. $("#results").html(output);
Add Comment
Please, Sign In to add comment