title: window.close(); not working in firefox
body: <p>After clicking close <code>button</code> current window is not closing in <code>Firefox</code> but its working fine in <code>IE</code> </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function closeWin() {
      var d=window.opener;
      try {
          var param="";
          var winHref=d.document.location.href;
          if(winHref.indexOf("?") &gt; -1){
           param=winHref.substr(winHref.indexOf("?"));
          }
          //d.document.location.href=d.document.forms[0].thankyouurl.value+'?'+param;
          d.document.location.href=d.document.getElementsByName('thankyouurl')[0].value+'?'+param;
      }
      catch(e){}
      finally{}
      window.close();
      return true;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="button" name="Button" value="Close" onClick="return closeWin();"&gt;</code></pre>
  </div>
  </div>
  </p>