0

Is there a way I can create one clickable link to open 4 different URL's as Browser tabs?

I tried to get it to work with window.open but can't figure out how to get multiple urls each on a new tab.

For example

<a href="#" onclick="window.open('http://google.com'); window.open('http://yahoo.com');">Click to open Google and Yahoo</a>

Thanks for your help

gwmbox
  • 123
  • 3
  • 13

2 Answers2

0

Your link is working for me. Please check if your Browser blocks the tab-creation (block-icon in the toolbar).

0

As per my comment above, I was actually doing it right, it was the browser stopping it from working, enabling popups fixed it.

Multiple window.open's is what I needed to use, e.g.

<a href="#" onclick="window.open('http://google.com'); window.open('http://yahoo.com'); window.open('http://bing.com'); window.open('http://duckduckgo.com');">Click to open Search Engines</a>

gwmbox
  • 123
  • 3
  • 13