title: Node-Red: how can I send a message from a Javascript function inside an HTML template?
body: <p>I am trying to send a message after the update of a round slider in an template node written in HTML. This is the code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;link href="https://cdnjs.cloudflare.com/ajax/libs/roundSlider/1.3.2/roundslider.min.css" rel="stylesheet" /&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/roundSlider/1.3.2/roundslider.min.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      $("#slider").roundSlider({
      radius: 100,
      width: 14,
      value: 20,
      handleSize: 35,
      startAngle: "315",
      endAngle: "+270",
      //start: "traceEvent",
      //stop: "traceEvent",
      create: "traceEvent",
      drag: "traceEvent"
      });
  
      function traceEvent(e) {
          var vol = (e.value);
          document.getElementById('volume').value = vol;
          return vol;
      }
      &lt;/script&gt;
  &lt;style&gt;
      #slider {
       border-radius: 1000px;
       box-shadow: 0px 0px 10px 0px rgb(123, 123, 123);
      }
      .rs-border {
       border-width: 0px;
      }
  &lt;/style&gt;
  </code></pre>
  
  <p></p>
  
  <p>Basically I was expecting that a message should be triggered by the command <code>return vol</code> in the function <code>traceEvent</code>, but this is not working.</p>
  
  <p>Any ideas please?</p>