title: Im trying to make a password validation no database and only one password
body: <p>I am trying to make a website that validates a specific password and if so it takes the user into my website I can't resolve the bug so can I get some help...?</p>
  
  <pre><code>&lt;script language="Javascript"&gt;
    function check(x){
      if (x == "HI"){
        alert("Just Press Ok to Continue...");
      } else {
        alert("Nope... not gonna happen");
      }
    }
  
    var grape = alert("Just press Ok to Countinue...")
  
    function alertIt() {
      if (grape === true){
        window.location="http://www.google.com";
      } else {
        alert("Nope... not gonna happen")
      }
    }
  
  }
  &lt;/script&gt;
  
  &lt;center&gt;
  &lt;br /&gt;&lt;h3&gt;Enter the Password&lt;/h3&gt;
  &lt;br /&gt;
  &lt;b&gt;Password:&lt;/b&gt;
  &lt;input type="password" id="pass" value=""&gt;
  &lt;br /&gt;&lt;br /&gt;
  &lt;button onclick="javascript:check(document.getElementById('pass').value)"&gt;Check Password&lt;/button&gt;
  &lt;button onclick="javascript:alertIt"&gt;On To my Website&lt;/button&gt;
  </code></pre>
  
  <p>Thank you I am just a kid and still rough on my javascript and I didnt wanna use PHP.</p>