0

Why am i getting this error?

the multiplier works but im getting a console error with the uncaught type error for .value..any ideas why? https://code.sololearn.com/WcOldIK21y17/?ref=app

20th Oct 2018, 4:42 AM
Jason Kennedy
7 Respostas
20th Oct 2018, 7:10 AM
Meet Mehta
Meet Mehta - avatar
+ 1
Remove the 'myFunction()' code on line 7 in your javascript code. It's the cause of your error.
20th Oct 2018, 7:57 AM
Lord Krishna
Lord Krishna - avatar
+ 1
hey thanks..i guess it wasnt needed since the html was calling the function?
20th Oct 2018, 8:00 AM
Jason Kennedy
+ 1
Correct. There was no need for it.
20th Oct 2018, 8:14 AM
Lord Krishna
Lord Krishna - avatar
0
why does putting it in the html not cause an error
20th Oct 2018, 7:16 AM
Jason Kennedy
0
Simply comment the myFunction() line in js tab. The error is because you call the function before your html is loaded.
20th Oct 2018, 7:21 AM
Lord Krishna
Lord Krishna - avatar
0
the window.onload didnt work..im unsure what you mean by comment in js tab
20th Oct 2018, 7:37 AM
Jason Kennedy