title: open in new tab of browser programmatically
body: <p>i have a login page in fancy box and on click of login i want the secure pages open in the new tab
  and uses this code</p>
  
  <p>// on code at btnlogin_click</p>
  
  <pre><code>FormsAuthentication.RedirectFromLoginPage(loginID, false);
     string redirectTo = GetResPath("/webPages/Default.aspx");
                  ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "add2", "parent.jQuery.redirTo='" + redirectTo + "'; parent.jQuery.fancybox.close();", true);
  </code></pre>
  
  <p>//on aspx page</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          $('[id*=logn_btn_new]').fancybox({
              'width': 480,
              'height': 280,
              'padding': 10,
              'margin': 10,
              'hideOnOverlayClick': false,
              'scrolling': 'no',
              'autoScale': false,
              'transitionIn': 'none',
              'transitionOut': 'none',
              'type': 'iframe',
              'onClosed': function () {
                  try {
  
                      if ($.redirTo != null &amp;&amp; $.redirTo.length &gt; 0) {
                          var pop = window.open($.redirTo, '_newtab');
  
                          if (pop == null) {
                              alert("Please allow popups.");
                          }
  
  
                      }
                  }
                  catch (err) {
                      alert(err);
                  }
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>and redirTo is hidden fielld.</p>
  
  <p>i am not able to open page in new tab can anybody help?</p>