Solved

windowpopup function behaves differently for MS edge browser

Posted on 2016-07-14
2
40 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now