Launch external URL

Can you please tell me what the proposed approach would be to launch an external URL from Noodl UI?

I’ve tried using a JS node and have attached the ‘Tap’ event of a button to the ‘go’ input on the JS node.

This is essentially what I implemeted:

define({
inputs: {
go: “boolean”
},
outputs: {
},
setup: function(inputs, outputs) {

},
run: function(inputs, outputs) {
    if (inputs.go) 
        location.href = "https://example.com";
}

});

That should work, your code looks fine! What problems are you encountering?

I provided a simple Launch URL component here:

I modified you code slightly to add an option to open in a new tab:

define({
    inputs: {
        launch: "signal",
        url: "string",
        openInTab: "boolean"
    },
    outputs: {
    },
    setup: function(inputs, outputs) {

    },
    run: function(inputs, outputs) {
        if(inputs.launch) {
            if(!inputs.openInTab)
                window.location.href = inputs.url;
            else {
                var win = window.open(inputs.url, '_blank');
                win&&win.focus();
            }
        }
    }
});