I just want to click a button, then, if you get the password right, it should redirect you to a different page, but if you get wrong, it should do nothing.
The following code below works, but it redirects you to the success page if you get it wrong as well. I just want it to redirect only if you get it right.
<div class="wrapper">
<form class="form1" action="http://google.com">
<div class="formtitle">
Enter the password to proceed
</div>
<div class="input nobottomborder">
<div class="inputtext">
Password:
</div>
<div class="inputcontent">
<input type="password" id="password" /><br />
</div>
</div>
<div class="buttons">
<input class="orangebutton" type="submit" value="Login" onclick="if (document.getElementById('password').value == 'hello') alert('Correct Password!'); else alert('Wrong Password!');" />
</div>
</form>
</div>