Trigger webix component from HTML link

edited October 2017 in Technical questions

I'm just wondering if there is a way to trigger a Webix component that is wrapped inside ui.template?

For instance: {template:"<\div> Agree to <\a href="{common.deleteButton()}"> terms</\a> </\div>"}

From a previous example i found:

In this example, rather than activating javascript.alert(), is there a way to activate a webix component?



  • We would rather recommend using the HTML templates where it's possible.

    For example, a template can have the same CSS as a regular button:

    There's also a possibility to set an active content to get a full-featured form input (ui.text, ui.button, ui.richselect, etc) and set any action on the component's click event handler (or any event you need). As a sample, please check

  • This was helpful and I figured out a roundabout way of doing it, but I'd like to use the ui.checkbox. I've tried using on_click (as it looks to be part of ui.checkbox), but it isn't working:

  • edited October 2017

    Can you please clarify, do you want to use ui.checkbox as a separate control or as an active element of a data component (as links/icons in the first samples)?

    Initialization and event handling are a bit different in these use-cases.

    Here's the corrected sample from the last message:

    Data components (datatable, list, tree, treetable) has the predefined onClick event.
    In all other components, onClick has to be declared in components configuration as an empty object for proper initialization, then the on_click can be set.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!