Spaces:
Sleeping
Sleeping
| ffunction navigateToItem(item) { | |
| localStorage.setItem("selectedItem", item); | |
| window.location.href = "item_page.html"; | |
| } | |
| window.onload = function() { | |
| const selectedItem = localStorage.getItem("selectedItem"); | |
| if (selectedItem) { | |
| document.getElementById("selected-item").innerText = `Selected: ${selectedItem}`; | |
| document.getElementById("suggestions").innerHTML = ` | |
| <div class="item-card">Paneer Butter Masala <button>Add</button></div> | |
| <div class="item-card">Garlic Naan <button>Add</button></div> | |
| `; | |
| } | |
| }; | |
| function goToSummary() { | |
| const customInput = document.getElementById("custom-input").value; | |
| const summary = `Item: ${localStorage.getItem("selectedItem")}, Custom: ${customInput}`; | |
| localStorage.setItem("orderSummary", summary); | |
| window.location.href = "summary_page.html"; | |
| } | |