-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
140 lines (127 loc) · 3.7 KB
/
index.html
File metadata and controls
140 lines (127 loc) · 3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Registration Form</title>
<%@include file="allCss.jsp" %>
</head>
<body>
<script type="text/javascript">
function checkpassword(){
if(document.signup.password.value!=document.signup.repassword.value){
alert('Password and Confirm Password field does not match');
document.signup.repassword.focus();
return false;
}
return true;
}
</script>
<%
String successMsg = (String) session.getAttribute("successMsg");
String errorMsg = (String) session.getAttribute("errorMsg");
String checkMsg = (String) session.getAttribute("checkMsg");
if (successMsg != null) {
%>
<script>
alert("User Registration Successfully...");
window.location.assign("index.jsp");
</script>
<%
session.removeAttribute("successMsg");
}
%>
<%
if (errorMsg != null) {
%>
<script>
alert("Something went Wrong..!!");
</script>
<%
session.removeAttribute("errorMsg");
}
%>
<%
if (checkMsg != null) {
%>
<script>
alert("Please Check Agree and Terms & Condition !!");
</script>
<%
session.removeAttribute("checkMsg");
}
%>
<div class="container-fluid">
<div class="row register">
<div class="col-sm-3"></div>
<div class="col-sm-6 reg">
<form class="" method="post" action="register" name="signup" onsubmit="return checkpassword()">
<h3>Registration Form</h3>
<div class="form-group">
<label class="control-label col-sm-4" for="name">Full Name</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="name" id="name"
placeholder="Enter Full Name">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="email">E-mail</label>
<div class="col-sm-8">
<input type="email" class="form-control" name="email" id="email"
placeholder="Enter Email">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="contact">Mobile Number</label>
<div class="col-sm-8">
<input type="number" class="form-control" name="contact" id="contact"
placeholder="Enter Mobile Number">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="password">Password</label>
<div class="col-sm-8">
<input type="password" class="form-control" name="password" id="password"
placeholder="Enter Password">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="password">Re-Enter Password</label>
<div class="col-sm-8">
<input type="password" class="form-control" name="repassword" id="repassword"
placeholder="Enter Password Again">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label><input type="checkbox" name="check" id="check"> I accept all the terms and conditions.</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<button type="submit" class="btn btn-default">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript">
function MobileValidate() {
var contact = document.getElementById("contact").value;
var contactTenDigit = /^\d{10}$/;
if (contact != '') {
if (contact.match(contactTenDigit)) {
return true;
} else {
alert("Enter Ten Digit Mobile Number");
return false;
}
}
}
</script>
</body>
</html>