-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathkfc.html
More file actions
165 lines (157 loc) · 7.62 KB
/
kfc.html
File metadata and controls
165 lines (157 loc) · 7.62 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
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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css">
<style>
#dialog {
width: 300px;
height: 300px;
position: fixed;
margin-top: 50px;
margin-left: 300px;
}
</style>
<script>
function CloseDialog() {
document.getElementById("dialog").style.display="none";
}
function ShowDialog(){
document.getElementById("dialog").style.display="block";
document.getElementById("lblName").innerHTML = "Hello ! " + document.getElementById("txtName").value;
var mealName="";
var adonName="";
var mealCost=0;
var adonCost=0;
var burger = document.getElementById("optBurger");
var roller = document.getElementById("optRoller");
var wings = document.getElementById("optWings");
var krusher = document.getElementById("optKrusher");
if(burger.checked) {
mealName = burger.value;
mealCost = 120;
}
if(roller.checked) {
mealName= roller.value;
mealCost = 100;
}
if(wings.checked) {
adonName += wings.value + "<br>";
adonCost = 80;
mealCost = mealCost + adonCost;
}
if(krusher.checked) {
adonName += krusher.value + "<br>";
adonCost = 40;
mealCost = mealCost + adonCost;
}
document.getElementById("lblMeal").innerHTML = mealName;
document.getElementById("lblAdon").innerHTML = adonName;
document.getElementById("lblAmount").innerHTML = "You have to Pay :" + "₹" + mealCost + "/-";
}
</script>
</head>
<body onload="CloseDialog()">
<div style="margin-top: 30px;" class="container text-center">
<div id="dialog">
<div class="card">
<div class="card-header">
<h3 id="lblName"></h3>
</div>
<div class="card-body">
<dl>
<dt>Meal Name</dt>
<dd id="lblMeal"></dd>
<dt>Ad-ON's</dt>
<dd id="lblAdon"></dd>
</dl>
</div>
<div class="card-footer">
<h3 id="lblAmount"></h3>
<input type="button" value="OK" class="btn btn-outline-danger" onclick="CloseDialog()">
</div>
</div>
</div>
<header>
<div>
<img src="../Images/kfctop.PNG" class="img-thumbnail">
</div>
</header>
<section>
<div style="margin-top: 10px;" class="bg-danger text-white">
<h2>Customer Details</h2>
<div>
<table align="center">
<tr>
<td>Name</td>
<td>
<input type="text" id="txtName" class="form-control">
</td>
</tr>
</table>
</div>
</div>
<div style="margin-top: 10px;" class="bg-danger">
<h2 class="text-white">Select a Meal</h2>
<div class="card-deck">
<div class="card">
<div class="card-header">
<h3>OMG Burger</h3>
</div>
<div class="card-body">
<img src="../Images/burger.PNG" class="img-thumbnail">
<input class="form-control" type="radio" id="optBurger" name="meal" value="OMG Burger">
</div>
<div class="card-footer">
<h3>₹ 120/- </h3>
</div>
</div>
<div class="card">
<div class="card-header">
<h3>OMG Roller</h3>
</div>
<div class="card-body">
<img src="../Images/roller.PNG" class="img-thumbnail">
<input class="form-control" type="radio" id="optRoller" name="meal" value="OMG Roller">
</div>
<div class="card-footer">
<h3>₹ 100/- </h3>
</div>
</div>
</div>
</div>
<div style="margin-top: 10px;" class="bg-danger">
<h2 class="text-white">Select a Ad-ON</h2>
<div class="card-deck">
<div class="card">
<div class="card-header">
<h3>Hot Wings</h3>
</div>
<div class="card-body">
<img src="../Images/wings.PNG" class="img-thumbnail">
<input class="form-control" type="checkbox" id="optWings" value="Hot Wings">
</div>
<div class="card-footer">
<h3>₹ 80/- </h3>
</div>
</div>
<div class="card">
<div class="card-header">
<h3>Krusher Brownine</h3>
</div>
<div class="card-body">
<img src="../Images/krusher.PNG" class="img-thumbnail">
<input class="form-control" type="checkbox" id="optKrusher" value="Krusher Brownine">
</div>
<div class="card-footer">
<h3>₹ 40/- </h3>
</div>
</div>
</div>
</div>
<div style="margin-top: 20px;">
<input type="button" value="Place Order" class="btn btn-outline-danger" onclick="ShowDialog()">
</div>
</section>
</div>
</body>
</html>