none
window.opener.focus() does not work in IE

    General discussion

  • Hi, i have the problem that IE cant bring up opener window when i call
    opener.focus() method

    window.opener.focus(); // After that, child window stay in front


    html1.htm 

       <script type="text/javascript" language="JavaScript"><!--
    
        function toCompare() {
    
         wCompare = window.open("html2.htm", "wCompare", 
    "width=800,height=600,resizable=yes,directories=no,status=no,toolbar=no,menubar=0,location=no,scrollbars=yes"); wCompare.focus(); }; //--></script> </head> <body> <a href="javascript://" onClick="toCompare();">open child window</a> </body>


    html2.htm

        <script type="text/javascript" language="JavaScript"><!--
    
              function show_Parent(url) {
    
                  window.opener.location.href = url;
    
                  window.opener.focus(); // After that, child window stay in front.
    
               }
    
            //--></script>
    
        </head>
    
        <body>
    
        
    
        <a onclick="return show_Parent('html3.htm');">go back to parent window</a>
    
            
    
        </body>
    
    

     Note that only in FireFox this code is working fine

    Monday, May 18, 2009 7:18 AM