-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript.js
More file actions
24 lines (21 loc) · 869 Bytes
/
Copy pathscript.js
File metadata and controls
24 lines (21 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function validatePasswords() {
var password = document.getElementById("password").value;
var confirmPassword = document.getElementById("confirm_password").value;
if (password !== confirmPassword) {
alert("Passwords do not match!");
document.getElementById("password").value = "";
document.getElementById("confirm_password").value = "";
return false; // Prevent form submission if passwords don't match
} if (password.length < 8) {
alert("Password is too Small...!");
document.getElementById("password").value = "";
document.getElementById("confirm_password").value = "";
return false;
}
// Passwords match
return true; // Allow form submission if passwords match
}
function toggleMenu() {
const menu = document.getElementById('mobile-menu');
menu.classList.toggle('hidden'); // Toggle hidden class using Tailwind
}