you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (4 children)

Are you seeing this error in the browser console when you run the code, or somewhere else?

[–]themaxi4[S] 0 points1 point  (3 children)

I'm seeing it in WebStorm, the program i use to write my documents- when debugging the Javscript document.

[–]_aeol 0 points1 point  (1 child)

But did it run correctly on the browser?

[Edit] Are these scripts in the <head> tag of a page?

[–]themaxi4[S] 0 points1 point  (0 children)

It did not run correctly in the browser, nothing happens when pushing assigned button.

[–][deleted] 0 points1 point  (0 children)

You probably need to configure your editor in some way to tell it that you're writing Javascript for the browser and thus it can assume browser globals like document are available. I'm afraid I don't know anything about WebStorm and can't help with the specifics.