UI for Zipcoin Blue

123456789101112131415161718192021222324252627282930313233
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <script type="text/javascript">
  5. var db = openDatabase('mydb', '1.0', 'Test DB', 2 * 1024 * 1024);
  6. var msg;
  7. db.transaction(function (tx) {
  8. tx.executeSql('CREATE TABLE IF NOT EXISTS LOGSSS (id unique, log)');
  9. tx.executeSql('INSERT INTO LOGSSS (id, log) VALUES (1, "foobar")');
  10. tx.executeSql('INSERT INTO LOGSSS (id, log) VALUES (2, ?)', [(new Blob([94864]))]);
  11. msg = '<p>Log message created and row inserted.</p>';
  12. document.querySelector('#status').innerHTML = msg;
  13. });
  14. db.transaction(function (tx) {
  15. tx.executeSql('SELECT * FROM LOGSSS', [], function (tx, results) {
  16. var len = results.rows.length, i;
  17. msg = "<p>Found rows: " + len + "</p>";
  18. document.querySelector('#status').innerHTML += msg;
  19. for (i = 0; i < len; i++){
  20. msg = "<p><b>" + results.rows.item(i).log + "</b></p>";
  21. document.querySelector('#status').innerHTML += msg;
  22. console.log(msg);
  23. }
  24. }, null);
  25. });
  26. </script>
  27. </head>
  28. <body>
  29. <div id="status" name="status">Status Message</div>
  30. </body>
  31. </html>