-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathotp.html
223 lines (173 loc) · 4.97 KB
/
otp.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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IdeaKart💡</title>
<link rel="stylesheet" href="navbar.css">
<link rel="stylesheet" href="footer.css">
<style>
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
font-family: 'Spartan', sans-serif;
}
#otp_box {
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
width: 50%;
margin: auto;
margin-bottom: 60px;
}
#optform {
font-size: larger;
padding: 50px;
}
#optform>label {
font-size: 40px;
color: #4B5563;
}
#otpsubmit {
width: 30%;
height: 50px;
border-radius: 30px;
margin-top: 30px;
font-size: xx-large;
margin: auto;
margin-top: 20px;
margin-left: 200px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
}
#otpinput {
box-sizing: border-box;
margin-top: 10px;
resize: vertical;
width: 100%;
height: 60px;
font-size: large;
border: 1px solid #ccc;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
}
#otpsubmit:hover {
background: #088178;
}
#payimage {
display: flex;
justify-content: space-evenly;
margin-top: 150px;
padding: 0 20px;
}
#payimage+p {
width: 40%;
margin: auto;
text-align: center;
margin-top: 40px;
margin-bottom: 30px;
}
</style>
</head>
<body>
<!-- navBar section start -->
<section id="header">
<a href="index.html" class="logo">IdeaKart💡</a>
<span id="search_box">
<input id="search" type="text" placeholder="Search for product">
<button id="seach_button">Search</button>
</span>
<div>
<ul id="navbar">
<li><a href="index.html">Home</a></li>
<li><a href="about_page.html">About</a></li>
<li><a href="contact_us_page.html">Contact</a></li>
<li id="login_text"><a href="login.html">Login</a></li>
<li><a href="cart.html" class="active">🛒</a></li>
</ul>
</div>
</section>
<!-- navBar section end -->
<!-- otp page of ideakart start -->
<div id="payimage">
<img src="https://paysecure.udio.in/resources/img/dhanipay_logo.png" alt="error">
<img src="https://paysecure.udio.in/resources/img/rupay_logo.png" alt="error">
</div>
<p>Please enter the One Time Password(OTP) sent to your registered mobile number/email id to successfully complete the
transaction</p>
<div id="otp_box">
<form action="" id="optform">
<label for="">Please enter OTP</label> <br> <br>
<input type="text" name="" id="otpinput"> <br> <br>
<input type="submit" name="" id="otpsubmit">
</form>
</div>
<!-- otp page of ideakart end -->
<!-- footer part of ideakart -->
<div id="foot-of-page">
<h3>Get To Know Us</h3>
<ul>
<li>
<a href="about_page.html">About</a>
</li>
<li>
<a href="contact_us_page.html">Contact</a>
</li>
<li>
<a href="search.html">Search</a>
</li>
<li>
<a href="privacy_policy.html">Privacy Policy</a>
</li>
<li>
<a href="refund_policy.html">Refund Policy</a>
</li>
<li>
<a href="earn_money.html">Earn Money Online</a>
</li>
</ul>
</div>
<!-- footer part of ideakart end -->
</body>
</html>
<script>
document.querySelector("#optform").addEventListener("submit", myfun);
function myfun() {
event.preventDefault();
let otp = document.querySelector("#otpinput").value;
let obj = {
otp: otp,
}
if (obj.otp == "123456") {
alert("Payment Successful 🎉🎉!!.. Press Ok To Continue Shopping");
window.location.href = "index.html";
} else {
alert("Please enter Valid otp...!😓");
window.location.reload();
}
}
</script>
<script>
let isSignin = JSON.parse(localStorage.getItem("signinData"));
let current_user_name = isSignin[0].name;
if (isSignin !== null) {
document.querySelector("#login_text").innerHTML =
`<select name="current_user" id="current_user">
<option id="useless" class="dash_options" value="">${current_user_name}</option>
<option class="dash_options" value="Dashboard">Dashboard</option>
<option class="dash_options" value="Notifications">Notifications</option>
<option class="dash_options" value="sign_out">Sign Out</option>
</select>`
}
let Dash = document.querySelector("#current_user");
Dash.addEventListener("change", dashFunction);
function dashFunction() {
if (Dash.value == "sign_out") {
localStorage.removeItem("signinData");
window.location.reload();
} else if (Dash.value == "Dashboard") {
window.location.href = "dashboard_home.html";
} else if (Dash.value == "Notifications") {
window.location.href = "notification.html";
}
}
</script>