/* var keys = {}; connection.onopen = function () { wsString += " $(\"#connection_status\").toggleClass(\"color-green\");"; wsString += " $(\"#connection_status\").text(\"Connected\");"; wsString += String(" connection.send(")+"\"{'mode': 'check_tb_status'}\");"; for(int i=0; i
\"+obj.l_title+\"

\"+obj.l_value+\"

\");}"; wsString += " else if(obj.mode === 't_button_startup'){ var tb_index = obj.index; for(i=0; i
"+data.label+"

"); } if (data.type === 'domLabel') { //initial rendering of the Labels $('#row').append("
"+data.l_title+"

"+data.label+"

"); } else if (data.type === 'value') { // Display some kind of value } else { console.log('unknown event'); } }; } function buttonclick(e) { // TODO: Make this more generic websock.send(e.id); }