• Hi! You should be able to specify a callback for onchange, like you had done in Line 23:

    b:TD.button({x:10,y:290,width:200,height­:100,label:"Press Me",value:0,name:"button",onchange:funct­ion(e){o.log.log("Pressed!");}}),

    If you change that to:

    onchange:function(e){ws.send("Button press");}

    and also ensure that you remove the other var ws to make ws global with:

          var ws;
          setTimeout(function() {
            ws = new WebSocket('ws://',"prot­ocolOne");

    Then you should be able to get something running :)

    Also, not all the examples use it yet, but template strings are a really nice way of inlining HTML code in JS:

    var page = `<html>
    <body> .....

Avatar for Gordon @Gordon started