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
Web BrowsersJavaScript

Avatar of undefined
Last Comment
leakim971

8/22/2022 - Mon
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
leakim971

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61