From the course: JavaScript: Web Form Programming

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

The FormData object

The FormData object

- In this example, we're going to learn about the FormData object and how it simplifies the process of getting Form information ready to be sent to a server. So starting from the early days of the web, it's been possible to build and submit forms without writing any Client-Side JavaScript code at all. The form element has an action attribute, which you can see right here, that contains the URL that processes the form submission. So all the form data gets submitted to that URL and then the resulting response page gets displayed in the browser. But, web development has evolved a lot over the years and if you're building a modern web app, such as a single page app or a progressive web app, then this is exactly the kind of user experience that you're trying to avoid. You don't want the user to have to experience a full round trip to the server, and then have the entire page reloaded. So, many developers get around this by using…

Contents