title: Delay on redirect (Javascript)
body: <p>My JS wont cooperate and redirect... Can anyone see my problem? Tried all day, it's like nothing works :(</p>
  
  <pre><code>function validate(form) {
      if (form.username.value==="admin") { 
          if (form.password.value==="1") {
              $('#loginLock').css({opacity: 0});
              $('#loginUnlock').css({opacity: 1});
              document.cookie="username=Admin";
              setTimeout(function(){ window.location.replace = 'vault.php';}, 1500);
          } else {
              alert("Forkert brugernavn eller password");
          }
      } else {
          alert("Forkert brugernavn eller password");
      }
  }
  </code></pre>