From df37352e973a4769b1a5c967686f95f6e8bf8cb8 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 8 Nov 2016 16:18:29 +0800 Subject: webui: websocket.js: Fix the bug for sending data to the server --- fg21sim/webui/static/js/websocket.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 { -- cgit v1.2.2