Basic JSON response.
1 //--allow-file-access-from-files
2 var server = "http://127.0.0.1:8080";
3 var view_left = "<view-left><h2>Machine</h2><p>Be yourself within Machine.</p></view-left>";
7 var com = document.getElementById("com");
8 $.ajax({url: server + "/com",
15 function callback(data, status, xhr)
17 view_left = "<view-left><h2>Machine</h2><p>" + data.time + "</p></view-left>";
18 $("view-left").replaceWith(view_left);
25 $("view-left").replaceWith(view_left);
33 if (event.which == 13)
35 event.preventDefault();