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...?
<script language="Javascript">
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")
}
}
}
</script>
<center>
<br /><h3>Enter the Password</h3>
<br />
<b>Password:</b>
<input type="password" id="pass" value="">
<br /><br />
<button onclick="javascript:check(document.getElementById('pass').value)">Check Password</button>
<button onclick="javascript:alertIt">On To my Website</button>
Thank you I am just a kid and still rough on my javascript and I didnt wanna use PHP.