title: Comparing Javascript Input
body: <p>My goal is to have one password open one file and another password open a different file. The first half seems to be working but the second password will not.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var password;
  var password2;
  var pass1 = "password"; // place password here
  var pass2 = "password2"; // place password here
  password=prompt("Please enter your password:","");
  
  if (password==pass1) {
  window.location= "WEB-PL_dom.xls";
  
  } else if (password2==pass2) {
  window.location= "WEB-PL_int.xls";
  
  } else 
  window.location= "pass_failed.html"; // file to load if password is incorrect
  
  // End --&gt;
  &lt;/script&gt;
  </code></pre>