title: open a new window inside the current window with javaScript
body: <p>I'm trying to do a prompt which will lead me to another site but I want the other site to replace the current window I was in. </p>
  
  <p>The code: </p>
  
  <pre><code>&lt;button id="butt"&gt;press&lt;/button&gt;
  
  &lt;script&gt;
  document.getElementById('butt').onclick = function()
  {
  var age = parseInt(prompt("please enter your age", "18")); //parseInt turns the string to numbers
     if(age &gt;= 18)
     {
         window.open('http://www.walla.co.il','walla');
     }
   }  
  </code></pre>