title: Exit from full screen not working?
body: <p>I'm working on a application which works in full screen mode.
  I'm using a Iframe to go to fullscreen. the problem is how to close that fullscreen on button click?</p>
  
  <p>I'm using this code:</p>
  
  <pre><code>function exitfs(){
      if (document.cancelFullScreen) {
          document.cancelFullScreen();
      } else if (document.mozCancelFullScreen) {
          document.mozCancelFullScreen();
      } else if (document.webkitCancelFullScreen) {
          document.webkitCancelFullScreen();
      }
  } 
  </code></pre>
  
  <p>It works fine if i run it through firebug console but not works when bind with click event?</p>
  
  <pre><code> function fullscreen(keys) {
      var f = e('newIfrane');
      if (keys) {
          if (f.mozRequestFullScreen) {
              f.mozRequestFullScreenWithKeys();
          } else if (f.webkitRequestFullScreen) {
              f.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
          }
      } else {
          if (f.mozRequestFullScreen) {
              f.mozRequestFullScreen();
          } else if (f.webkitRequestFullScreen) {
              f.webkitRequestFullScreen();
          }
      }
  }
  </code></pre>
  
  <p>calling this function like <code>fullscreen(false);</code></p>
  
  <p><strong>Note:</strong> Iframe is loading the same page in fullscreen mode. 
  In Page there is a Image on click of that image I'm calling  <strong>exitfs()</strong>.</p>
  
  <p>I'm not getting what is the problem?
  Thanks... </p>