-
Notifications
You must be signed in to change notification settings - Fork 6
/
js.js
129 lines (89 loc) · 4.8 KB
/
js.js
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
if (review1 ===5 ) {
document.getElementById("systemResponse").innerHTML = "Thank you for giving us a 5 star rating. Have a good day"
} else if(review1 === 4){
document.getElementById("systemResponse").innerHTML = "Thank you for giving us a 4 star rating. We'll work harder to give you a better experience"
} else if(review === 3){
document.getElementById("systemResponse").innerHTML = "Thank you for reviewing our site. We will work harder to make your experience better"
} else if (review === 2) {
document.getElementById("systemResponse").innerHTML = "Sorry for the inconvenience. Plz mail us at [email protected] for queries"
} else{
document.getElementById("systemResponse").innerHTML = "Sorry for the incovenience. Plz mail us at [email protected] for queries"
}
if(review1 > 3 ){
if (review1 === 4) {
document.getElementById("systemResponse").innerHTML = "Thank you for giving us a 4 star rating. We'll work harder to give you a better experience"
} else {
if (review1 ===5) {
document.getElementById("systemResponse").innerHTML = "Thank you for giving us a 5 star rating. Have a good day"
} else {
document.getElementById("systemResponse").innerHTML = "Error. Please choose a number between 1 to 5"
}
}
} else {
if (review1 === 2) {
document.getElementById("systemResponse").innerHTML = "Sorry for the inconvenience. Plz mail us at [email protected] for queries"
} else {
if (review1 === 1) {
document.getElementById("systemResponse").innerHTML = "Sorry for the incovenience. Plz mail us at [email protected] for queries"
} else {
if (review1 ===3) {
document.getElementById("systemResponse").innerHTML = "Thank you for reviewing our site. We will work harder to make your experience better"
} else {
document.getElementById("systemResponse").innerHTML = "Error. Please choose a number between 1 to 5"
}
}
}
}
if (review1 ===5 ) {
document.getElementById("systemResponse").innerHTML = "Thank you for giving us a 5 star rating. Have a good day"
} else if(review1 === 4){
document.getElementById("systemResponse").innerHTML = "Thank you for giving us a 4 star rating. We'll work harder to give you a better experience"
} else if(review === 3){
document.getElementById("systemResponse").innerHTML = "Thank you for reviewing our site. We will work harder to make your experience better"
} else if (review === 2) {
document.getElementById("systemResponse").innerHTML = "Sorry for the inconvenience. Plz mail us at [email protected] for queries"
} else{
document.getElementById("systemResponse").innerHTML = "Sorry for the incovenience. Plz mail us at [email protected] for queries"
}
switch (review1) {
case value: 1;
document.getElementById("systemResponse").innerHTML = "Sorry for the incovenience. Plz mail us at [email protected] for queries"
break;
case value: 2;
document.getElementById("systemResponse").innerHTML = "Sorry for the inconvenience. Plz mail us at [email protected] for queries"
break;
case value: 3;
document.getElementById("systemResponse").innerHTML = "Thank you for reviewing our site. We will work harder to make your experience better"
break;
case value: 4;
document.getElementById("systemResponse").innerHTML = "Thank you for giving us a 4 star rating. We'll work harder to give you a better experience"
case value: 5;
document.getElementById("systemResponse").innerHTML = "Thank you for giving us a 5 star rating. Have a good day"
default:
document.getElementById("systemResponse").innerHTML = "Enter a number between 1 and 5"
break;
}
var reply= ;
function rating() {
review1 = document.getElementById("review1").value;
document.getElementById("systemResponse").innerHTML = review1;
switch (review1) {
case 1:
reply = "Sorry for the incovenience. Plz mail us at [email protected] for queries"
break;
case 2:
reply = "Sorry for the inconvenience. Plz mail us at [email protected] for queries"
break;
case 3:
reply = "Thank you for reviewing our site. We will work harder to make your experience better"
break;
case 4:
reply = "Thank you for giving us a 4 star rating. We'll work harder to give you a better experience"
case 5:
reply = "Thank you for giving us a 5 star rating. Have a good day"
default:
reply = "Enter a number between 1 and 5"
break;
}
document.getElementById("systemResponse").innerHTML = reply;
}