-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
42 lines (39 loc) · 1.03 KB
/
script.js
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
function validateForm() {
var a = document.forms["joinform"]["first-name"].value;
var b = document.forms["joinform"]["last-name"].value;
var c = document.forms["joinform"]["email-address"].value;
var f = document.forms["joinform"]["A"].value;
var g = document.forms["joinform"]["B"].value;
var h = document.forms["joinform"]["C"].value;
var i = document.forms["joinform"]["committee"].value;
if (a == "") {
alert("first name must be filled out");
return false;
}
if (b == "") {
alert("last name must be filled out");
return false;
}
if (c == "null") {
alert("email address must be filled out");
return false;
}
if (e == "") {
alert("grade must be filled out");
return false;
}
if (f == "" or g == "" or h =="") {
alert("cohort must be filled out");
return false;
}
if (i == "") {
alert("committee must be filled out");
return false;
}
}
function openForm() {
document.getElementById("myForm").style.display = "block";
}
function closeForm() {
document.getElementById("myForm").style.display = "none";
}