10 Processing Forms with JavaScript
CoffeeRun is off to a good start. It has two JavaScript modules that handle its internal logic and an HTML form styled with Bootstrap. In this chapter, you will write a more complex module that connects the form to the logic, allowing you to use the form to enter coffee orders.
Recall from Chapter 2 that browsers communicate with
servers by sending requests for information for a particular URL. Specifically,
for every file that the browser needs to load, it sends a GET
request to the server for that file.
When the browser needs to send information to a server, such as
when a user fills out and submits a form, the browser takes the form data and puts it
in a POST
request. The server receives ...
Get Front-End Web Development: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.