-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSignup.html
More file actions
90 lines (77 loc) · 3.58 KB
/
Signup.html
File metadata and controls
90 lines (77 loc) · 3.58 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
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/index.css" media="screen">
<link rel="stylesheet" type="text/css" href="css/signup.css" media="screen">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title> </title>
<script src="js/validator.js"></script>
<script>
window.onload = function(){
var signupForm = document.getElementById('signupForm');
signupForm.addEventListener('submit', function (event) {
var isInputNotEmpty = !validator.isEmpty(document.getElementById('fName').value) &&
!validator.isEmpty(document.getElementById('lName').value) &&
!validator.isEmpty(document.getElementById('pwd').value) &&
!validator.isEmpty(document.getElementById('email').value);
var isDobValid = validator.isDate(document.getElementById('dob').value) &&
validator.isBeforeToday(document.getElementById('dob').value);
var isPwdValid = validator.isLength(document.getElementById('pwd').value, 8) &&
validator.isOfLength(document.getElementById('pwd').value, 6);
var isEmailValid = validator.isEmailAddress(document.getElementById('email').value);
event.preventDefault();
if (!isInputNotEmpty || !isDobValid || !isPwdValid || !isEmailValid)
document.getElementById('sForm').className = 'invalid';
else
document.getElementById('sForm').className = 'valid';
});
}
</script>
</head>
<body>
<div class="header">
<h1>Tom Narainpursat</h1>
<h4>
Modern Front End Developer
</br>
<span class='quote'>"Where ever you go that's where you are"</span>
</h4>
</div>
<div class ='space'>
<div class='nav'>
<h3>Menu</h3>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="Button.html">Button</a></li>
<li><a href="SideBar.html">Profile Card</a></li>
<li><a href="Signup.html">Signup</a></li>
<li><a href="Search.html">Search</a></li>
<li><a href="Questionairre.html">Questionaire</a></li>
<li><a href="Login.html">Login</a></li>
<li><a href="Colours.html">Colour Builder</a></li>
<li><a href="ShippingBilling.html">Shipping & Billing</a></li>
<li><a href="CreditDebitCard.html">Payment Info</a></li>
<li><a href="Calculator.html">Calculator</a></li>
<li><a href="ProductListing.html">Products</a></li>
</ul>
</div>
<div id='content'>
<div class='form_main'>
<h1>Signup Form</h1>
<!--Signup Form Markup -->
<div class="form" id="signupForm">
<form id ="sForm">
<fieldset>
<label for="firstName"><span>First Name <span class="required">*</span></span><input type="text" class="input-field" name="firstName" id = "fName"/></label>
<label for="lastName"><span>Last Name <span class="required">*</span></span><input type="text" class="input-field" name="lastName" value="" id ="lName"/></label>
<label for="email"><span>Email Address <span class="required">*</span></span><input type="email" class="input-field" name="email" value="" id ="email"/></label>
<label for="dob"><span>Date of Birth <span class="required">*</span></span><input type="text" class="input-field" name="dob" value="" id ="dob"/></label>
<label for="pwd"><span>Password <span class="required">*</span></span><input type="password" class="input-field" name="pwd" value="" id ="pwd"/></label>
<label><input type="submit" value="Submit" id="submit"/></label>
</fieldset>
</form>
</div>
</div>
</div>
</div>
</body>
</html>