Skip to content
← Back to Community
Javascript Error
Profile icon
h
has Hacker Plan
DaxCodes

So I was making a project with my buddy @sqcodes and we came across this javascript error when we submit the "form". It's really weird and we couldn't figure it out

Here's the Error:

TypeError: Cannot read properties of null (reading 'value')
at yes (/script.js:7:46)
at HTMLButtonElement.onclick (/:17:29)

Does anybody have any suggestions?
Thanks!

  • DaxCodes & SQCodes
Answered by MrVoo [earned 5 cycles]
View Answer
Voters
Profile icon
DaxCodes
Comments
hotnewtop
Profile icon
MrVoo

<input if="q2" type="text">
You have 'if' instead of 'id' .-.

Profile icon
DaxCodes

@MrVoo Oh. Thank you!

Profile icon
VulcanWM

For the second input you did if=“q2” instead of id=“q2”

Profile icon
DaxCodes

@VulcanWM Same with you, thanks!

Profile icon
VulcanWM