-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode-1.js
More file actions
19 lines (17 loc) · 789 Bytes
/
Copy pathcode-1.js
File metadata and controls
19 lines (17 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function checkCreds() {
var eventName = document.getElementById("eventName").value;
var theme = document.getElementById("theme").value;
var peopleCount = document.getElementById("numPart").value;
var eventInfo = eventName + " " + theme;
if (eventInfo.length >20 || eventInfo.length <4) {
// if (eventInfo.length > 40 || eventInfo.length < 2) {
document.getElementById("loginStatus").innerHTML = "EventName has invalid number of characters!";
}
else if (peopleCount > 20 || peopleCount < 2) {
document.getElementById("loginStatus").innerHTML = "Number of participants is an invalid number!";
}
else {
alert("Access Granted, Welcome " + eventInfo + "!");
location.replace("tables.html");
}
}