summaryrefslogtreecommitdiff
path: root/cmd/dolmetschctld/web-static
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-02-13 18:51:34 +0100
committerChristian Pointner <equinox@spreadspace.org>2019-02-13 18:51:34 +0100
commit92ee4b170eecefbb02616fed8c41df0071ce1e66 (patch)
treeed1633cf9dd1beed944eb95f66c3e937b4ee872e /cmd/dolmetschctld/web-static
parentmake web socket test page a little nicer (diff)
implemented set_language command via web sockets
Diffstat (limited to 'cmd/dolmetschctld/web-static')
-rw-r--r--cmd/dolmetschctld/web-static/socket.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/dolmetschctld/web-static/socket.html b/cmd/dolmetschctld/web-static/socket.html
index 903868d..b9bebbb 100644
--- a/cmd/dolmetschctld/web-static/socket.html
+++ b/cmd/dolmetschctld/web-static/socket.html
@@ -49,6 +49,11 @@
ctrl.send(req);
}
+ function set_language() {
+ req = { command: "language", arguments: [ $('#inputlang').val() ] };
+ ctrl.send(req);
+ }
+
function init() {
$('#buttonstate').attr('disabled','disabled')
}
@@ -60,6 +65,8 @@
<div>
<button id="buttonstate" onclick="state()">get state</button>
+ <button id="buttonlang" onclick="set_language()">set language</button>
+ <input type="text" id="inputlang" length="10">
<div id="rawmsg" class="data"></div>
</div>