www-thermferm/js/index.js

changeset 208
934d45d9751d
parent 134
f05601490415
child 256
8c52b09bdecc
--- a/www-thermferm/js/index.js	Sun Aug 10 16:17:03 2014 +0200
+++ b/www-thermferm/js/index.js	Sun Aug 10 16:56:22 2014 +0200
@@ -22,6 +22,12 @@
 
 
 $(document).ready(function () {
+    setInterval(function(){
+      $.getJSON("getroom.php", function(data) {
+        $("#room_temp").html(data.temperature);
+        $("#room_hum").html(data.humidity);
+      });
+    }, 10000);
     // Create jqxTabs.
     $("#jqxTabs").jqxTabs({ width: 978, height: 428, position: 'top', theme: 'ui-redmond'});
     $("#maintenance").jqxButton({ width: 150, height: 25, theme: 'ui-redmond' });

mercurial