I don't understand this Uncaught TypeError in the JS function (JSFiddle included)

Here is my jsFiddle: https://jsfiddle.net/websteve/v8Leuz94/

I am getting an uncaught type error for this line:

form1[“Note” + i].value = localStorage[“practicelog.html.note.” + i];

Does something in the line have to be declared?
Perhaps it is not yet loaded for the JS function to use it?

Any pointers to make this code work will be appreciated!

Hi WebSteve welcome to he forum

The problem starts with the line before it.

var form1 = document.getElementById('form1');

There is no element with the id “form1”

1 Like

Thank you! I used “name” and not “id.” Got it. Much appreciated.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.