title: open window on click of button as modal dialog using javascript
body: <p>I have to open a window when a button is clicked, as a modal dialog using JavaScript.
  I have used <code>window.open</code>, but it shows me two instances, the parent page and the pop-up page.
  When the pop-up page is open, then do not allow the user to click on the parent page.   </p>
  
  <pre><code>function openWindow() {
    var w = 950;
    var h = 350;
    var t = 0;
    var l = 0;
    var scrollbars = 1;
    var modal = 'yes';
  
    var reportWindow = window.open("Search.aspx" + '', '', "width=" + w + ",height=" + h + ",left=" + l + ",top=" + t + ',scrollbars=' + scrollbars + 'modal' + modal);
    reportWindow.focus();
  }
  </code></pre>