How to return focus on parent window from a pop window while loading first time
<p>I am working on a website. Where while loading website first time opening index page with one pop window. First my problem is I want to minimize this pop window automatically while loading first time and focus return to website without any click in website.</p>

<p>Here is my code in index page I write this function: </p>

<pre><code>myFunction();
 function myFunction() {
   //var myWindow = window.open("music.php", "", "width=320,height=60");

   var myWindow = window.open("music.php", "", "directories=0,titlebar=0,toolbar=0,location=0,status=0,menubar=0,scrollbars=no,resizable=no,left=-100000000, top=100000, width=320, height=1, display=none","visibility=hidden");
    //myWindow.moveTo(0, 0);
}
</code></pre>

<p>And pop window having page extension <code>music.php</code> which should be minimize automatically and focus return to index page without any click on website.</p>

<p>I have already try with <a href="https://stackoverflow.com/questions/2965754/set-the-focus-of-a-popup-window-everytime">set the focus of a popup window to website everytime</a> , but it was also not working.</p>