-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormPage.html
More file actions
270 lines (229 loc) · 8.79 KB
/
FormPage.html
File metadata and controls
270 lines (229 loc) · 8.79 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>TypeScript HTML Form Validator Application</title>
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s="
crossorigin="anonymous"></script>
<script src="formvalidator.js"></script>
<style>
/* The Modal (background) */
.modal {
display: block;
/* Hidden by default */
position: fixed;
/* Stay in place */
z-index: 1;
/* Sit on top */
padding-top: 100px;
/* Location of the box */
left: 0;
top: 0;
width: 100%;
/* Full width */
height: 100%;
/* Full height */
overflow: auto;
/* Enable scroll if needed */
background-color: rgb(0, 0, 0);
/* Fallback color */
background-color: rgba(0, 0, 0, 0.4);
/* Black w/ opacity */
}
/* Modal Content */
.modal-content {
position: relative;
background-color: #fefefe;
margin: auto;
padding: 0;
border: 1px solid #888;
width: 365px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
-webkit-animation-name: animatetop;
-webkit-animation-duration: 0.4s;
animation-name: animatetop;
animation-duration: 0.4s
}
/* Add Animation */
@-webkit-keyframes animatetop {
from {
top: -300px;
opacity: 0
}
to {
top: 0;
opacity: 1
}
}
@keyframes animatetop {
from {
top: -300px;
opacity: 0
}
to {
top: 0;
opacity: 1
}
}
/* The Close Button */
.close {
color: white;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.modal-header {
padding: 2px 16px;
background-color: #5cb85c;
color: white;
}
.modal-body {
padding: 2px 16px;
}
.modal-footer {
padding: 2px 16px;
background-color: #5cb85c;
color: white;
}
input[type="text"] {
width: 200px;
}
input[type="password"] {
width: 200px;
}
input[type="submit"] {
width: 125px;
}
.tooltiptext {
visibility:hidden;
width: 232px;
background-color: lightgoldenrodyellow;
color: red;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
top: -5px;
left: 105%;
font-size:15px;
border: 1px solid gray;
}
.tooltiptext::after {
content: "";
position: absolute;
top: 50%;
right: 100%;
margin-top: -5px;
border-width: 5px;
border-style: solid;
border-color: transparent red transparent transparent;
}
</style>
</head>
<body>
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<div class="modal-header">
<span class="close">×</span>
<h2>New User Subscription</h2>
</div>
<div class="modal-body" style="padding:30px 30px 30px 30px;">
<form id="userform" method="post">
<table>
<tr>
<td valign="top" style="padding:5px;">
First name:
</td>
<td>
<div style="position: relative;display: inline-block;">
<input type="text" id="firstName" name="firstname"><span class="tooltiptext" style="position:absolute;padding-left:5px;color:red;"
id="firstNameErrors"></span>
</div><br>
</td>
</tr>
<tr>
<td valign="top" style="padding:5px;">
Last name:
</td>
<td>
<div style="position: relative;display: inline-block;">
<input type="text" id="lastName" name="lastname"><span class="tooltiptext" style="position:absolute;padding-left:5px;color:red;"
id="lastNameErrors"></span>
</div><br>
</td>
</tr>
<tr>
<td valign="top" style="padding:5px;">
Age:
</td>
<td>
<div style="position: relative;display: inline-block;">
<input type="text" id="age" name="Age"><span class="tooltiptext" style="position:absolute;padding-left:5px;color:red;"
id="ageErrors"></span>
</div>
<br>
</td>
</tr>
<tr>
<td valign="top" style="padding:5px;">
SSN:
</td>
<td>
<div style="position: relative;display: inline-block;">
<input type="text" id="ssn" name="ssn"><span class="tooltiptext" style="position:absolute;padding-left:5px;color:red;"
id="ssnErrors"></span>
</div>
<br>
</td>
</tr>
<tr>
<td valign="top" style="padding:5px;">
Email:
</td>
<td>
<div style="position: relative;display: inline-block;">
<input type="text" id="email" name="email"><span class="tooltiptext" style="position:absolute;padding-left:5px;color:red;"
id="emailErrors"></span>
</div>
<br>
</td>
</tr>
<tr>
<td valign="top" style="padding:5px;">
Password:
</td>
<td>
<div style="position: relative;display: inline-block;">
<input type="password" id="password" name="password"><span class="tooltiptext" style="position:absolute;padding-left:5px;color:red;"
id="passwordErrors"></span>
</div>
<br>
</td>
</tr>
</table>
<div style="height:28px;">
<table width="100%">
<tr>
<td style="padding:10px;">
<input type="submit" value="Submit">
</td>
<td style="padding:10px;">
<input type="submit" value="Cancel">
</td>
</tr>
</table>
</div>
</form>
</div>
</div>
</div>
</body>
</html>