Call functions externally

Hi Bill,

You can set an id for the input field, and use document.getElementById('id of the input field') to access it. For example:

  • In the custom element:
    <input type="text" id="user_name">
  • In an event:
    var user_name = document.getElementById('user_name').value;

You should double-click the Function field, select Add Function to add an event handler, and call the normal function in the handler:

function yourEventHandler(doc, e) {
    yourNormalFunction();
}

Regards

1 Like

Thank you Toan! I will try that.
Love this software! The html widget and custom element add so much more. :smiley:

1 Like