0

I am trying to open two webpages in two new tabs on button click. But when the application tries to open third tab, i am getting popup blocker. I know popup blocker wont be enabled when request comes from trusted source like button click etc. But is there any way to open two webpages in two tabs on single button click without popup blocker. Below is my code

selectField.on("click", function (e) {
        e.preventDefault();
        var url = 'http://<domain>:7080/Auth';
        var url1 = 'http://<domain>:7080/geoserver'
        window.open(url);
        window.open(url1);
 })
Harnish Kumar
  • 315
  • 5
  • 17
  • 1
    Possible duplicate of [Open multiple links in Chrome at once as new tabs](https://stackoverflow.com/questions/24364117/open-multiple-links-in-chrome-at-once-as-new-tabs) – holydragon Mar 14 '19 at 07:26
  • Well, I guess that's exactly what popup blockers are for. – Olafant Mar 14 '19 at 07:28
  • @holydragon The plain vanilla js solution mentioned in https://stackoverflow.com/questions/24364117/open-multiple-links-in-chrome-at-once-as-new-tabs is not working – Harnish Kumar Mar 14 '19 at 07:36
  • why do you want to do this anyway? Doesn't this break the users expectations when a link (click on Button) opens two windows instead of one? – LuckyLikey Mar 14 '19 at 07:39

0 Answers0