-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeliver.js
More file actions
51 lines (46 loc) · 1.5 KB
/
deliver.js
File metadata and controls
51 lines (46 loc) · 1.5 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
$(window).on("hashchange", function () {
if (location.hash.slice(1) == "signup") {
$(".page").addClass("extend");
$("#login").removeClass("active");
$("#signup").addClass("active");
} else {
$(".page").removeClass("extend");
$("#login").addClass("active");
$("#signup").removeClass("active");
}
});
$(window).trigger("hashchange");
function validateLoginForm() {
var name = document.getElementById("logName").value;
var password = document.getElementById("logPassword").value;
if (name == "" || password == "") {
document.getElementById("errorMsg").innerHTML = "Please fill the required fields"
return false;
}
else if (password.length < 8) {
document.getElementById("errorMsg").innerHTML = "Your password must include atleast 8 characters"
return false;
}
else {
// alert("Successfully logged in");
window.location.href = "deliverypageforagent.html";
}
}
function validateSignupForm() {
var mail = document.getElementById("signEmail").value;
var phn=document.getElementById("phoneno").value;
var name = document.getElementById("signName").value;
var password = document.getElementById("signPassword").value;
if (mail == "" || phn=="" || name == "" || password == "") {
document.getElementById("errorMsg").innerHTML = "Please fill the required fields"
return false;
}
else if (password.length < 8) {
document.getElementById("errorMsg").innerHTML = "Your password must include atleast 8 characters"
return false;
}
else {
alert("Successfully signed up");
return true;
}
}