-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathofficedepot_survey.html
197 lines (171 loc) · 6.18 KB
/
officedepot_survey.html
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Office Depot Customer Survey</title>
<style>
body {
font-family: Arial, sans-serif;
background-image: url('https://example.com/officedepot_background.jpg'); /* Replace with your Office Depot theme image */
background-size: cover;
background-position: center;
margin: 0;
padding: 20px;
color: #fff;
}
.container {
width: 90%;
max-width: 800px;
margin: 50px auto;
padding: 20px;
background: rgba(255, 255, 255, 0.8);
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.question {
margin-bottom: 20px;
}
.question h2 {
font-size: 24px;
color: #333;
}
.question label {
display: block;
margin-bottom: 10px;
}
.question input[type="radio"] {
margin-right: 10px;
}
.button-container {
text-align: center;
}
.button-container button {
background-color: #007bff;
color: white;
border: none;
padding: 10px 20px;
font-size: 16px;
border-radius: 5px;
cursor: pointer;
margin: 10px;
transition: background-color 0.3s;
}
.button-container button:hover {
background-color: #0056b3;
}
.button-container .back-button {
background-color: #ff6f61;
}
.button-container .back-button:hover {
background-color: #ff4f40;
}
.timer {
text-align: center;
font-size: 18px;
margin-top: 10px;
}
.message {
text-align: center;
font-size: 18px;
margin-top: 20px;
}
</style>
</head>
<body>
<div class="container">
<div id="questionContainer" class="question">
<!-- Survey questions will be dynamically inserted here -->
</div>
<div class="timer">
Time remaining: <span id="timer">10</span> seconds
</div>
<div class="button-container">
<button id="backButton" class="back-button" style="display:none;">Back</button>
<button id="nextButton">Next</button>
</div>
<div id="message" class="message"></div>
</div>
<script>
const questions = [
{
question: "How satisfied are you with the range of office supplies available at Office Depot?",
options: ["Very Dissatisfied", "Dissatisfied", "Neutral", "Satisfied", "Very Satisfied"]
},
{
question: "How would you rate the quality of customer service at Office Depot?",
options: ["Very Poor", "Poor", "Average", "Good", "Excellent"]
},
{
question: "How easy was it to navigate the Office Depot website?",
options: ["Very Difficult", "Difficult", "Neutral", "Easy", "Very Easy"]
},
{
question: "How do you rate the pricing of products at Office Depot?",
options: ["Very Poor", "Poor", "Average", "Good", "Excellent"]
},
{
question: "Were you satisfied with the delivery speed of your purchase?",
options: ["Very Unsatisfied", "Unsatisfied", "Neutral", "Satisfied", "Very Satisfied"]
},
{
question: "How likely are you to shop at Office Depot again?",
options: ["Very Unlikely", "Unlikely", "Neutral", "Likely", "Very Likely"]
},
{
question: "What improvements would you suggest for Office Depot?",
options: ["More Product Variety", "Faster Delivery", "Better Website Navigation", "Improved Customer Service", "Other"]
}
];
let currentQuestion = 0;
let timer;
function startTimer() {
let timeLeft = 10;
document.getElementById('timer').innerText = timeLeft;
document.getElementById('nextButton').disabled = true;
timer = setInterval(() => {
timeLeft--;
document.getElementById('timer').innerText = timeLeft;
if (timeLeft <= 0) {
clearInterval(timer);
document.getElementById('nextButton').disabled = false;
}
}, 1000);
}
function displayQuestion() {
if (currentQuestion >= questions.length) {
document.getElementById('questionContainer').innerHTML = "<p>Thank you for completing the survey!</p>";
document.getElementById('nextButton').style.display = 'none';
document.getElementById('backButton').style.display = 'none';
return;
}
const q = questions[currentQuestion];
let optionsHtml = q.options.map((option, index) => `
<label>
<input type="radio" name="question" value="${index}">
${option}
</label>
`).join('<br>');
document.getElementById('questionContainer').innerHTML = `
<h2>${q.question}</h2>
${optionsHtml}
`;
startTimer();
document.getElementById('backButton').style.display = currentQuestion > 0 ? 'inline-block' : 'none';
}
function nextQuestion() {
currentQuestion++;
displayQuestion();
}
function goBack() {
if (currentQuestion > 0) {
currentQuestion--;
displayQuestion();
}
}
document.getElementById('nextButton').addEventListener('click', nextQuestion);
document.getElementById('backButton').addEventListener('click', goBack);
displayQuestion();
</script>
</body>
</html>