Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8863385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:57:55+00:00 2026-06-14T15:57:55+00:00

I give the user an option to open a single tab or a tab

  • 0

I give the user an option to open a single tab or a tab group. When they click a special link I would like to open several related tabs. The javascript for opening several tabs is as follows:

<li>
  <a href="javascript:launchAll()">Or launch them all at once</a>
</li>

<script>
   function launchAll() {
     var win = window.open("http://domain.com/page1");
     win = window.open("http://domain.com/page2");
     win = window.open("http://domain.com/page3");
     win = window.open("http://domain.com/page4");
   }
</script>

The first two open as tabs the second two try to open as popups/in separate windows, which are blocked in my case. Unblocking popups is not the issue and this UI is not the question. My question is why these four seemingly identical calls produce different results.

UPDATE: this only seems to happen in Chrome. Firefox and Safari open all as new tabs. Does anyone know a work around?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:57:57+00:00Added an answer on June 14, 2026 at 3:57 pm

    This limitation is actually due to a Chrome security setting: Chrome doesn’t want people to be able to open unlimited tabs by just one click. Therefore, the setting they use is, maximum of two tabs for the first click, one tab for each additional click. So, if you wanted to get around this, you would have to do something like this:

    <li>
      <a href="javascript:launchAll()">Or launch them all at once</a>
      <a href="javascript:launch()" id="test"></a>
      <a href="javascript:launch2()" id="test2"></a>
    </li>
    
    <script>
       function launchAll() {
         var win = window.open("http://domain.com/page1");
         win = window.open("http://domain.com/page2");
         document.getElementById("test").click();
       }
       function launch(){
         var win = window.open("http://domain.com/page3");
         document.getElementById("test2").click();
       }
       function launch2(){
         var win = window.open("http://domain.com/page4");
       }
    </script>
    

    Note that since the <a id="test*"> contents are empty, they won’t show up in your document, so your layout stays the same.

    Also, note, that the click() method does not exist in Firefox, so you would have to use something like here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I open a new window and would like to give the user the option
I would like to give the user a file browser from within a webpage.
I'd like to give a user the option of making SQL queries. I placed
I am using a Lucene.Net index and want to give the user an option
I would to give the user the feature to run the shell script in
I want to give the user the option to use a tutorial, the first
Is it possible to launch an option like which application you want to open
I am trying to give the user the option to edit hue and brightness
I'm trying to give the user an option to search on a timescale. I
I would like to have the user upload a file inside a form and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.