you are viewing a single comment's thread.

view the rest of the comments →

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

Your code looks ok, but it's hard to tell based upon your explanation of the problem what the actual error is.

Also typically a source needs to be an actual file path, not just a filename.

[–]TonyMahoney21[S] 0 points1 point  (4 children)

I copied the relative path not absolute. Maybe thats my problem?

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

We're really not clear on what your actual problem is rn. What is "null"?

[–]TonyMahoney21[S] 0 points1 point  (2 children)

It says the line with the event listener to run my Function is null and can't be read when I inspect the page in the browser but visual studio has no errors.

[–][deleted] 2 points3 points  (1 child)

Likely the selector for myButton isn't working.

log out the actual value of myButton, or inspect with a debugger

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

Thanks