I am making a a single-page to place restaurant orders: To the left I have a menu. On each menu item there is an “add to order”, in the center you’ll see the order populated with every click. (order will also have a total )’ and to the right a send order button.
I am able to make the menu just fine, but I am thinking of how to populate the order.
On a high level. How would I best do that? I am coding in vanilla JavaScript and I am making this page since a web agency I contacted earlier sent me a coding challenge.
I have googled and found answers about AJAX and submitting forms, but they all seem to be guides on how to interact with a server. What I imagine is the page interacting with just itself when going from click on menu to populate order. I Imagine the order itself being a form that then is submitted. with the “send order” button.