title: HTML/Javascript - username and password
body: <p>This html code below is suppose to execute and launch an alert asking for a username and if you get the username correct than it will ask for a password but nothing happens if i open this page in a browser. Why this doing this? What am I missing?  Please don't tell me this is a unsecure way to do this I already know I'm just improvising until I implant a better way.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script language="JavaScript"&gt;
  var username;
  var user1="grant"
  username=prompt('Please Log in. Username:',' ');
  if (username=user1);
     var pass1="password";
     password=prompt('If you are suppose to be here you have a password. Please type                  it now:',' ');
      if (password==pass1);
      else {
          window.location="wrongpassword.html";
      }
  else {
    window.location="wrongpassword.html";
  }
  &lt;/script&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;html&gt;
  </code></pre>