diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-11-08 16:18:29 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-11-08 16:18:29 +0800 |
commit | df37352e973a4769b1a5c967686f95f6e8bf8cb8 (patch) | |
tree | 833c1f478aaa2c24d44fb581f9bb92983206db15 /fg21sim/webui/static | |
parent | 40017dc8af4a4f46bc376b2f8561c75416424cbb (diff) | |
download | fg21sim-df37352e973a4769b1a5c967686f95f6e8bf8cb8.tar.bz2 |
webui: websocket.js: Fix the bug for sending data to the server
Diffstat (limited to 'fg21sim/webui/static')
-rw-r--r-- | fg21sim/webui/static/js/websocket.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fg21sim/webui/static/js/websocket.js b/fg21sim/webui/static/js/websocket.js index 968a3de..0c566c6 100644 --- a/fg21sim/webui/static/js/websocket.js +++ b/fg21sim/webui/static/js/websocket.js @@ -208,7 +208,8 @@ $(document).ready(function () { var name = $(e.target).attr("name"); var value = getFormConfigSingle(name); // Sync form configuration to the server - setServerConfigs(g_ws, {name: value}); + // NOTE: Use the "computed property names" available in ECMAScript 6 + setServerConfigs(g_ws, {[name]: value}); }); } else { |