From the course: JavaScript: Client-Side Data Storage

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

IndexedDB setup and connection

IndexedDB setup and connection - JavaScript Tutorial

From the course: JavaScript: Client-Side Data Storage

Start my 1-month free trial

IndexedDB setup and connection

- [Instructor] Now that we've got a good review of IndexedDB, let's get our files ready to start working with this database. We'll first create the form elements in our HTML, and then set up our database in our app.js file. Let's get to it. The first thing we'll do is copy all that code here in the app.js, so command C, and then create a brand new file here, like we've done before for local storage, so create one for session storage so we can keep what we've done here as a reference if you want to go back to it. Then we should have all the stuff that we had in the previous file, save it, and then delete all this in the app.js. Then let's get to our index.html, and start coding what we need in this particular form here. So the few things that will change, actually, let's just remove all this inside of the form, and the form will add a class to it, which will be new contact. And then we'll create a label, and then create also an input. So let's create an input. Again, I'm using Emmet to…

Contents