I’m working with some code provided via this post, courtesy of @Phrogz.
I’ve now tweaked and trimmed it to a launch-point for my needs, so I’m trying to plug that JS into my test page.
I threw a copy of my test page here on Pastebin.
I’m getting this error (courtesy of line 126):
Uncaught TypeError: Cannot call method ‘addEventListener’ of null
My attempts to this point have all revolved around the guess that the updateFromInput function is at the heart of the error. I played with it all the ways that I could think of, and no dice 🙂
Granted, though, I’m faaar from being a JS master, so …
Can someone explain why the error?
Apparently, input_1 is null.
The problem could be with querySelector. You could instead try getElementsByClassName.Oh, your class on your element is “input1” but you’re selecting “input_1”. Easy mistake 🙂