1

In my website, I have 2 popups. Anstead on showing new popup, it replaced the current tab with the new one when I click and the old tab is gone. Is there anyway to make that both popup is visible at the same time? I

$chrome_link = "http://example.com";

echo "<td rowspan=\"4\" colspan=\"4\"><a href=\"javascript:void()\" onclick=\"openURL('".$chrome_link."','".$tab."')\">Please Click me to Draw the Defect</a></td>";
echo    "</tr>";

Below is in Javascript.

    function openURL(link,tab)
{

    if(tab != 'qualitychk' && tab != 'fabqadefchk'){
        var o = document.getElementsByName('waflist');

        for(z=0; z<o.length; z++)
        {
            if(o[z].checked == true)
            {
                var waf = o[z].value;
            }

        }

        link = link + '&curwaf=' + waf;
    }

  var ua = window.navigator.userAgent;
            if (ua.indexOf("Edg") > 0) {  //Edge
                window.location = link;
            }
            else if (ua.indexOf("Trident") > 0 || ua.indexOf("Chrome") > 0) {  //IE or Chrome
                window.location = ("microsoft-edge:link");
                
            }
}

//end

Tylee
  • 153
  • 5
  • I don't see where there is supposed to be any actual popup functionality here? Assigning a new value to `window.location` changes the current tab, it doesn't open anything new. – CBroe Jun 03 '22 at 06:43
  • Yes yes, Instead on showing new popup, it replaced the current tab with the new one when I click and the old tab is gone. I just confused and don't know how to explain. – Tylee Jun 03 '22 at 06:48
  • Does this not work https://stackoverflow.com/questions/4907843/open-a-url-in-a-new-tab-and-not-a-new-window ? – Beyers Jun 03 '22 at 06:58

0 Answers0