I had first named is index.html as instructed in the example. Because I wanted to try out if it would make a difference if it was not a local file, I wanted to rename it, to try of I it would work online, but I didn’t want it to interfere with my own websit, so I didn’t want to have it named index. I changed the name to indexedDB.html and suddenly it worked.
I was wondering; can I use one indexDB for different subpages on a website? for instance in this example; use one page as a form to fill in notes and another one for displaying the list?
Thanks.
Is there a way to make that work locally? as I am still trying stuff out for myself?
I now have made 2 pages in one folder, but then it doesn’t seem to have the IDB information filled in in the form on one page available in the second page.
I basically split the html file from the example in 2 pages, replacing the list bit on the first page with a link to the second page, which has the link info, but not the form section.
I am using the basic script file identically for both html pages; maybe I should change that?
If you could point me in the right direction, that would be very helpful.
I’ve put my code on GitHub at https://github.com/Karen-Kramer/IndexedDB . Hope this enables you to have a look at it; I’m quite new to GitHub.
I did put the code as it is now on a website of my own; it works from there, but if I have these 4 files (2 html pages, one css stylesheet and 1 js code) locally on my computer in one folder the database does not seem to be used by both html files.
I would very much appreciate it if you can take some time to look into it.
Maybe its because the previously stored indexedDB was removed since the browser is pointing to a different URL after renaming the html document’s name.
I was trying to follow the tutorial and kept altering the js file along the way. So, maybe the database was created in a bad structure. It seems that is the reason incrementing the database version solved the issue.