-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
67 lines (54 loc) · 1.47 KB
/
script.js
File metadata and controls
67 lines (54 loc) · 1.47 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
function navigateToLogin() {
window.location.href = 'pages/login.html';
}
function navigateToIndex() {
window.location.href = '../index.html';
}
function navigateToSignup() {
window.location.href = 'pages/signup.html';
}
function navigateToStart() {
window.location.href = 'pages/login.html';
}
//logout nav
function navigateToLogout() {
window.location.href = '../index.html';
}
//1st quiz
function navigateToCarquiz(){
window.location.href= 'f1.html';
}
//2nd quiz
function navigateTohisquiz(){
window.location.href= 'indianhistory.html'
}
//3rd quiz
function navigateTogkquiz(){
window.location.href= 'gk.html'
}
//4th quiz
function navigateTosportsquiz(){
window.location.href= 'sports.html'
}
//5th quiz
function navigateTotechquiz(){
window.location.href= 'technology.html'
}
//6th quiz
function navigateTogeoquiz(){
window.location.href= 'geo.html'
}
//contact
// JavaScript to show and hide popup
document.getElementById('contactLink').addEventListener('click', function(event) {
event.preventDefault();
document.getElementById('contactPopup').style.display = 'flex';
});
function closePopup() {
document.getElementById('contactPopup').style.display = 'none';
}
document.getElementById('contactForm').addEventListener('submit', function(event) {
event.preventDefault(); // Prevent form from submitting the default way
alert('Your message has been sent!');
closePopup(); // Close the popup after form submission
});