lundi 23 novembre 2020

Issue freezing the parent window of a webpage (opened window doesn't load in Chrome)

We are trying to make our webpages work in Chrome, as they currently work in IE. We noticed opening new windows using window.open() works fine in Internet Explorer but not Chrome (I asked another question about this earlier but failed to provide a minimum reproducible example so there was trouble). In my attempt to create a reproducible example, I noticed that the issue was not in the window.open() but rather the way that we were freezing our parent screen while the new window was up. This method of looping the main window while the new window is not closed works great in Internet Explorer, but in Chrome, the new window fails to load and appears as about.blank. Is there a better way to do this in Chrome?

Below is what I hope to be a sufficient minimum reproducible example. If I am missing any other information that you need in order to answer this question, please let me know. Any guidance is appreciated, thank you!

<html>
<script type="text/javascript">

    function EnterAudit() {
        var sObj = window.open("windowOpenMinReprodExample.asp", "", "width=650px, height=700px");
        Bounce(sObj);

        //wait for window to close
        while (!(sObj.closed)) { }
        document.myform.submit();
        return;
    }

    function Bounce(w) {
        window.blur();
        w.focus();
    }
</script>
<body>
<form name="myform" action="EwayAudit.asp" method="post" id="myform">

<input type="button" tabindex="2" id="Submit" name="Submit" value="Submit" onclick="EnterAudit();"/>
</form>
</BODY>
</HTML>



Aucun commentaire:

Enregistrer un commentaire