<html>
<head>
<title>Register</title>
<style>
.content{
position: relative;
top: 130px;
border:3px solid black;
padding: 50px;
width:300px;
margin: auto auto 200px auto;
align: center;
}
body{
background-image: url(Register.jpg);
background-size: cover;
}
.s1{
float:left;
}
.s2{
float:right;
}
.s3 {
margin-left: 110px;
}
.s4{
margin-left: 90px;
}
.s4 a{
color: black;
font-size: 12;
}
.s4 a:hover{
color: blue;
}
p{
font-size: 12;
color: red;
}
.d1{
margin-left:
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
$("#pass , #pass1").on("keyup", function () {
if ($("#pass").val() == $("#pass").val()) {
$("#pass1").css("border", "3px solid green");
} else
$("#pass1").css("border", "3px solid red");
});
</script>
</head>
<body>
<jsp:include page="header.html"/>
<div class="container">
<div class="content">
<form class="page" method="post" action="RegisterPage" name="register">
<span class="s1">
First Name
</span>
<span class="s2">
<input name="firstname" placeholder="Firstname" id="firstname" required>
</span>
<br><br>
<span class="s1">
Last Name
</span>
<span class="s2">
<input name="lastname" placeholder="Lastname" id="lastname" required>
</span>
<br><br>
<span class="s1">
Date of Birth
</span>
<span class="s2">
<input id = "input1" name="dob" type="date" placeholder="DD-MM-YYYY" id="date" required>
</span>
<br><br>
<span class="s1">
Gender
</span>
<span class="s2">
<input id = "input2" type="radio" name="gen" value="Male" required>Male
<input id = "input2" type="radio" name="gen" value="Female">Female
</span>
<br><br>
<span class="s1">
Membership Type
</span>
<span class="s2">
<input id = "input2" type="radio" name="mem" value="Librarian" required>Librarian
<input id = "input2" type="radio" name="mem" value="Member">Member
</span>
<br><br>
<span class="s1">
Address
</span>
<span class="s2">
<input name="addr" placeholder="Address First Line" id="addr" required>
</span>
<br><br>
<span class="s1">
Contact Number
</span>
<span class="s2">
<input id = "input1" name="c_no" type="number" placeholder="9999888777" id="c_no" required>
</span>
<br><br>
<span class="s1">
Email ID
</span>
<span class="s2">
<input name="loginID" type="email" placeholder="<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ee8f8c8dae8a8b88c08d8183">[email protected]</a>" id="loginID" required>
</span>
<br><br>
<span class="s1">
Username
</span>
<span class="s2">
<input name="username" placeholder="Username" id="username" required>
</span>
<br><br>
<span class="s1">
Password
</span>
<span class="s2">
<input name="password" type = "password" placeholder="Password" id="pass" required>
</span>
<br><br>
<span class="s1">
Confirm Password
</span>
<span class="s2">
<input name="password1" type="password" placeholder="Confirm Password" id="pass1" required>
</span>
<br>
<div class="d1"><p>${error}</p></div>
<br><br>
<span class="s3"><input type="submit" value="Register" onClick="check()"></span>
<br><br>
<span class="s4">
<a href="Login.jsp">Already a user!! Login</a>
</span>
</form>
</div>
</div>
<jsp:include page="footer.html"/>
</body>
</html>
Having issues with the code functionality as intended. Green border should appear when passwords match, but it's not working correctly in Eclipse IDE. Seeking assistance to resolve this problem and looking into whether different IDs impact jQuery statements.