title: Checking focus in multiple frame fails
body: <p>I am using two frames inside a frameset on my <code>main.html</code> page.The source of the first frame is internal where the 2nd frame contains crossdomain source.In first frame i am showing a timer and in 2nd the content of cross domain.The timer only runs when the window is in focus otherwise(if you switch tabs or launch a new software ) it shows a warning message that window is out of focus.The problem i am facing is to make the focus fully workable.For example when i am clicking any content of the second frame then my code is detecting it as a lose of focus and showing the waring message though i am active on the current window(neither i switched tab nor launched any new application/software). How to solve this problem ?</p>
  
  <p>Here is my code </p>
  
  <p>Main.html</p>
  
  <pre><code>&lt;script&gt;
  window.onload = function(){
  document.getElementById('q1').focus();
  
  }
  
  &lt;/script&gt;
  
  &lt;frameset rows="130,*" style="border: 1px #CC3333"  noresize="noresize" "&gt;
  &lt;frame id="q1" name="showcountframe" src="count.html" scrolling=no marginheight="2" marginwidth="2"  noresize="noresize"&gt;
  &lt;frame name="showcontframe" src="gmail.com" marginheight="0" marginwidth="0" noresize="noresize"&gt;
  &lt;/frameset&gt;&lt;noframes&gt;&lt;/noframes&gt;
  </code></pre>
  
  <p>Count.html   </p>
  
  <pre><code>  &lt;script&gt;
      var w_focus = true;
  
      window.onblur = function() {
        w_focus = false;
      }
  
  
      if(w_focus = true)
  
      {
      //code for running timer
  
      }
      else 
      {
        $('#warn').show();
      }
      &lt;script&gt;
  
      &lt;div id="warn"&gt;Focus lost!&lt;/div&gt;
  </code></pre>