is not working when I click to open the popup

When I click to open the new pop-up in Edge, it’s getting the error message Uncaught SyntaxError: Unexpected token ')'. That error only cause when I use instead of window.location.
I didn’t use the window.location because it close up the first popup page and it replace the first popup page with the second one. But when I try to use, it doesn’t response. I want to make is not to close the first popup when I click to open the second popup page. Is there anyway to do that? Also, when I add target=_blank in html, it just showing action:blocked and also tryna added target=popupand shows action:untitled.

$chrome_link = "".$getlotid."&tab=".$tab."&ocr=".$getocr."&postid=".$Now;
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 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
       = link;
            else if (ua.indexOf("Trident") > 0 || ua.indexOf("Chrome") > 0) {  //IE or Chrome
       = ("microsoft-edge:link");

>Solution : is a function, not a property:


So you need to call it appropriately. Also note you need to actually concatenate the link into your call:;"microsoft-edge:" + link);

Leave a Reply