Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

windowpopup function behaves differently for MS edge browser

Posted on 2016-07-14
2
62 Views
Last Modified: 2016-07-19
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
0
Comment
Question by:Devildib
2 Comments
 

Author Comment

by:Devildib
ID: 41711418
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;
 
}
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 41713699
don't do : form1.submit
do : document.getElementById("myFormID").submit

so add an ID attribute to your form.
<form id="myFormID" name="form1"

use ID on any element you need to play with instead using name attribute
1

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question