title: Open a website in an iframe instead of a new window
body: <p>Once I click on a button, it should open a website in an <code>iframe</code>, and the  modal should not have a URL since it is showing in new window. The modal should be in the center of the window. As I know its easy with Bootstrap but I wanted to do this in pure JavaScript.</p>
  
  <p><strong>HTML Code</strong></p>
  
  <pre><code>&lt;button type="button" class="btn" onclick="executeOnClick()" id="w3schools"&gt;
      Open Website
  &lt;/button&gt;
  </code></pre>
  
  <p><strong>Javascript Code</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function executeOnClick(){
          var win = open('http://www.w3schools.com/', 'example', 'width=600,height=450')
          win.focus();
          win.onload = function() {
              var div = win.document.createElement('div');
              div.innerHTML = 'Welcome into the future!';
              div.style.fontSize = '30px';
              win.document.body.insertBefore( div, win.document.body.firstChild )
          }
          return true;
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Any help would be much appreciated !!!</p>