Right now i have a verifying code here:
<script type="text/javascript">
var i = prompt("Enter The Password: ");
if (i === x) {
window.location.href = '';
}
else {
document.write("PASSWORD INVALID!!!")
}
</script>
and another piece of code is here:
<script> <!-- not the same as above -->
var x = prompt("Choose a password: ");
</script>
I would like to take the value from the 'choose a password' prompt in the second script, in order to create a password on the 'enter the password' prompt. Bascially the x
variable in the second script must be the same as x
variable in the first script. Any suggestions?