Skip to content

Instantly share code, notes, and snippets.

@HishamMubarak
Created May 25, 2017 07:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HishamMubarak/a253b76cd948bc35ab08df3449867313 to your computer and use it in GitHub Desktop.
Save HishamMubarak/a253b76cd948bc35ab08df3449867313 to your computer and use it in GitHub Desktop.
Password Reset Form
<script>
function confirm() {
var pass1 = document.getElementById("passOne").value;
var pass2 = document.getElementById("passTwo").value;
if (pass1 != pass2) {
document.getElementById("passOne").style.borderColor = "#E34234";
document.getElementById("passTwo").style.borderColor = "#E34234";
alert("Password Don't Match");
} else {
alert("Passwords Match");
}
}
</script>
<form action="/reset" method="POST">
<input type="password" id="passOne" name="pass1" placeholder="Enter New Password">
<input type="password" id="passTwo" name="pass2" placeholder="Confirm New Password">
<input type="hidden" name="resetCode" value="<%= code %>" />
<input type="submit" onclick="confirm()">
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment