Infinity-1995 commited on
Commit
9506f11
·
verified ·
1 Parent(s): 3c81619

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +24 -4
index.html CHANGED
@@ -54,10 +54,11 @@ body {
54
  <a href="about.html">About</a>
55
  </div>
56
 
57
- <button onclick="openModal()"
58
- class="bg-white text-emerald-600 px-5 py-2 rounded-full font-semibold">
59
- Join as a Restaurant
60
- </button>
 
61
 
62
  </nav>
63
 
@@ -190,6 +191,25 @@ body {
190
  </div>
191
 
192
  <script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  function openModal(){
194
  modal.classList.remove("hidden");
195
  modal.classList.add("flex");
 
54
  <a href="about.html">About</a>
55
  </div>
56
 
57
+
58
+ <button onclick="handleSubmit()" class="w-full bg-emerald-600 text-white py-2 rounded">
59
+ Submit
60
+ </button>
61
+
62
 
63
  </nav>
64
 
 
191
  </div>
192
 
193
  <script>
194
+
195
+ function handleSubmit() {
196
+ // simple validation (optional)
197
+ const inputs = document.querySelectorAll("input");
198
+
199
+ let filled = true;
200
+ inputs.forEach(i => {
201
+ if (!i.value) filled = false;
202
+ });
203
+
204
+ if (!filled) {
205
+ alert("Please fill all details");
206
+ return;
207
+ }
208
+
209
+ // redirect to dashboard
210
+ window.location.href = "dashboard.html";
211
+ }
212
+
213
  function openModal(){
214
  modal.classList.remove("hidden");
215
  modal.classList.add("flex");