Select Item opens a URL

I'm new to Webix and have a basic TreeTable page working with Select. My goal that when an item is selected it opens a public URL. I can't find anything close to this in the docs or examples. Although I'm n to able to get a simple Webix message to open on either!

There is what I have so far:

webix.ready(function(){ var set1 = { rows:[ { view:"text", label:"Filter by Company or Staff", labelPosition:"top" }, { view:"tree", borderless:true, id:"tree1", select:true, data:[{id:"1", open:false, value:"Jones Cleaning"}, {id:"2", open:false, value:"My Company", data:[ {id:"2.1", value:"Jones, John" }, {id:"2.2", value:"Blow, Jow" }, {id:"2.3", value:"Tow, Ming" } ]}] } ] }; webix.ui({ container:"treeView", cols:[set1], select: true, on:{ onItemClick:function(id){ webix.message("Click: "); } } }); $$("$text1").attachEvent("onTimedKeyPress",function(){ $$("tree1").filter("#value#",this.getValue()); }) });



  • Hello, @karstyn

    To reach opening a public URL when an item is selected you could use any of the next variants:
    1) It's possible to put a link into Tree Node Templates
    Here is the snippet:
    2) You could use with onItemClick event.
    Here is the snippet:

  • Thank you AlenaLisava - I'll play with this to see if I can make it work for my situation. The goal for me is not to have a new window or tab open, but to send an API call 'behind the scenes'.

  • Just realized I never gave an update on this. I was able to get my link working based on tweaking your examples. Thank you!

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!

In this Discussion