When a user begins typing a password without entering their email address first, immediately display the message - “Please Enter Your Email Address First”. My project utilizes bootstrap4 and jQuery/Javascript. I need the cursor to move to the field where an error is detected. Additionally, when all validations are met, how can I redirect to another page upon clicking the Submit Button? I've attempted using anchor tags in HTML for redirection upon button click, but it redirects to the link instead of validating. I've also tried using the window.location method with no response.
<!DOCTYPE html>
<html>
<head>
<title>Three Forms</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
</head>;
<body style="background-color: grey">
<div class="container" style="background-color: green;padding-bottom: 2%;">
<div style="background-color: black;">
<h2><b>Forms</b></h2>
</div>
<div class="row" style="margin-top: 3%;">
<div class="col-xs-12 col-sm-6 col-md-3" style="background-color: white;padding: 0px;margin-left: 4%;margin-right: 3%;margin-bottom: 3%;">
<form class="form-A" id="form-A">
<div style="background: linear-gradient(to top left, #ff9999 0%, #ff9966 35%); height: 100px; text-align : center; color:white;">
<h3><b>Log In</b></h3>
</div>
<div style="padding: 4%;">
<div class="form-sm">
<!-- Input fields removed for brevity -->
</div>
</div>
</form>
</div>
<div class="col-xs-12 col-sm-6 col-md-3" style="background-color: white;padding: 0px;margin-left: 4%;margin-right: 3%;margin-bottom: 3%;">
<form id="form-B" style="padding-left: 4%;padding-right: 3%;margin-left:-4%;margin-right:-3%;">
<h3 style="color:#cc00cc;text-align : center;"><b>Sign Up</b></h3>
<div class="md-form form-sm" style="padding: 3%;">
<!-- Input fields removed for brevity -->
</div>
</form>
</div>
<div class="col-xs-12 col-sm-6 col-md-3" style="background-color:white;margin-left: 4%;margin-right:3%;padding:top:0.5%;margin-bottom: 3%;">
<form id="form-C">
<h3 style="text-align : center;"><b>Sign In </b></h3>
<div class="md-form form-sm" style="padding-top:1%;">
</div>
</form>
</div>
</div>
</div>
<script>
// Form validation scripts removed for brevity
</script>
</body>
</html>
;