DEV Community

loading...

Discussion on: Need Help About JavaScript Error Log

Collapse
blindfish3 profile image
Ben Calder

We'd need to see the corresponding HTML and any other code that interacts with the page. The error you get suggests the element doesn't exist. Perhaps you add (or even remove) it dynamically elsewhere? Maybe there's a typo in your id?

Also a suggestion: when posting code snippets put 'js' after the backticks to add syntax highlighting. It makes it much easier to read:


```js
   // your code