Link to home
Start Free TrialLog in
Avatar of Devildib
Devildib

asked on

windowpopup function behaves differently for MS edge browser

Hi Experts,

I have a javascript function at the end of which I call this line:
windowpopup(openUrl, window, "height=400px;width=460px;status:0;help:no;scroll=no","showModalDialog");

This behaves fine for IE 11, FF and chrome, but on MS edge browser, the window doesnot come up and gets bypassed al;together.
Now, if I change the 'window' parameter which is the 2nd parameter in the line above to a string say "window", it works well on all browsers. But if the window is having a button and I need to capture its event, I do form1.submit where form1 is the window name, in that case submit button doesnot work.This is because button needs a form object or window object to tag to itself and in cases where we have changed the 2nd parameter above from window object to a string,, the button is not working.

Please help
Avatar of Devildib
Devildib

ASKER

Defination of the windowpopup function:

function windowpopup(URL,windowname,para,type)
{
    var parameters = para.replace(/\;/g, ",");
    window.top.captureEvents (Event.CLICK|Event.FOCUS);
    window.top.onclick = IgnoreEvents;
    window.top.onfocus=HandleFocus;
    winModalWindow = window.open(URL, windowname, parameters);    
    childwindows[childwindows.length] = winModalWindow;
    winModalWindow.focus();
    return winModalWindow;
 
}
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial