title: Popup window using Javascript
body: <p>i am trying to open a page in popup using ModalDialog. 
  Issue: The popup window get closed before it gets loaded.</p>
  
  <p>Code:</p>
  
  <pre><code>function ShowPopup(id, rowIndex) {  
      var options = {
          title: "Add User Account",
          width: 750,
          height: 800,
          url: "/sites/Main/sitepages/Home.aspx"
      };
  
      SP.UI.ModalDialog.showModalDialog(options);
  }
  
   this.btnAccOk.Attributes.Add("onclick", "javascript:ShowPopup(0,0);");
  </code></pre>