Spaces:
Running
Running
Update index.html
Browse files- index.html +24 -4
index.html
CHANGED
|
@@ -54,10 +54,11 @@ body {
|
|
| 54 |
<a href="about.html">About</a>
|
| 55 |
</div>
|
| 56 |
|
| 57 |
-
|
| 58 |
-
class="
|
| 59 |
-
|
| 60 |
-
|
|
|
|
| 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");
|