Button and new tab

Hello, so I have a dashboard that contains a button. I would like to know if it is possible on node-red to automatically click this button; the ideal will be that it opens in a new tab. Is it possible?

I don't understand what you mean. When you click a button it sends a message back to the server, you can make your flow emulate that just by sending the same message. I don't see what that has to do with "it opens in a new tab ". What opens in a new tab?

Maybe use a button for that it's not a good idea but I have a http URL and I want to open this URL on chrome automaticly

Why not just use a normal html link to the page you want to open? If you include in the URL target=”_blank” then it should open it in a new tab in the browser.

1 Like

So what you have is a link, which as Colin describes can be added target="_blank" to to have it open in a new tab.
As for automatically clicking that, you can use javascript: HTMLElement.click() - Web APIs | MDN, connected to whatever you need for it.

1 Like

good ! Do you know now how to do the same thing with target but not to open a new tab but a new windows, new instance of chrome ?

New windows are usually blocked by the browser’s builtin popup blocker so you’ll need to go into the settings/whitelist the page first.
Scroll down to target here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.