How do I Open links in different tabs

Hi, I am trying to set workflow which opens a link in a new tab.

Previously, i was using the “link” element, which does not seem to work with the new responsive editor.

So i was able to achieve as far as opening a new tat using Javascript with “Tool box”
however, it refreshes the currently opened page when i click another element.
スクリーンショット 2022-03-24 18.28.55

is there any way to open links in different tabs instead of refreshing the existing one?

I’m not sure what you mean by the link element doesn’t work with the new responsive engine? I’ve had no issues in any of my apps… perhaps you could elaborate on the problem?

In any case, if you want to open a URL in a new tab using JavaScript then what you’ve got there is the way to do it.

I’m not sure what you mean by refreshing the existing page when you click another element?

Perhaps expand on the issue or share some links so someone can see what’s going on.

Checkout the plugin “Open URL in new tab- no id required”

Thank you @adamhholmes for the reply, and please forgive me for my poor english.

I’m not sure what you mean by the link element doesn’t work
before using the new responsive editor, i could place a link element over any element, so when the user clicks the element, it opens up a new tab each time.

refreshing the existing page when you click another element?
the way i did with javascript only allows one tab to open.
so when i click different element, the one which opened previously refreshes, instead of another tab being open by clicking the element.

i want different tabs to open for each click, like when you click.

i hope this makes sense.

I understand your question now…

But I don’t understand why it’s happening… it certainly doesn’t happen for me, not in Edge or Chrome anyway…

Which browser are you using (it could be a browser specific issue)?

Regarding the link element not working with the new responsive engine - you can still use that method if the parent group layout is ‘fixed’ or ‘align to parent’ - so it depends on the design of your page as to whether or not you can still use that method.

i managed to fix it.
thank you so much!

1 Like

How did you fix the issue of opening new tabs, not just refreshing the currently opened one? I’m having the same exact problem as you.

I couldn’t get URLs to open in multiple tabs. Calling window.open(“URL”,“blank”) multiple times with unique URLs would open a new tab, but then load all the URLs in that same tab.

Using this code gives a unique “context” as the second parameter, which seems to be the trick.

var locs = ['URL1', 'URL2', 'URL3']

for (let i = 0; i < locs.length; i++) {
  window.open(locs[i], locs[i])
}