Error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Error

Now it's fixed TypeError: null is not an object (evaluating 'document.getElementById("text").value;')

4th Aug 2018, 10:26 AM
Jonas
22 Answers
+ 3
are you sure "text" is an input element? if not use ".innerHTML" in place of ".value"
4th Aug 2018, 10:31 AM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
+ 2
then wrap it up in "window.onload" function
4th Aug 2018, 10:37 AM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
+ 2
document.querySelector('#text').value;
4th Aug 2018, 11:54 AM
Vj Abishek
Vj Abishek - avatar
+ 2
show your source code. Copy your code and paste here...
4th Aug 2018, 2:43 PM
Vj Abishek
Vj Abishek - avatar
+ 2
Please link your code URL, some friends here had tried to help you, but the best thing to do is to show the code, so everyone can see clearly where the problem lies, don't leave them shooting blanks ...
4th Aug 2018, 3:31 PM
Ipang
+ 1
are u sure you made a element with text. Ok then try the code document.querySelector('#text');
4th Aug 2018, 11:53 AM
Vj Abishek
Vj Abishek - avatar
+ 1
then you show the source code.
4th Aug 2018, 2:32 PM
Vj Abishek
Vj Abishek - avatar
+ 1
it will be easy to understand what is the error
4th Aug 2018, 2:33 PM
Vj Abishek
Vj Abishek - avatar
+ 1
hmm
4th Aug 2018, 2:45 PM
Vj Abishek
Vj Abishek - avatar
+ 1
I said! "wrap it up in window.onload. here: https://code.sololearn.com/WKwwE32umnG1/?ref=app
4th Aug 2018, 9:08 PM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
0
yes
4th Aug 2018, 10:32 AM
Jonas
0
on me it's happens evrytime I trying
4th Aug 2018, 10:34 AM
Jonas
0
I will try it
4th Aug 2018, 10:38 AM
Jonas
0
It's not working
4th Aug 2018, 10:46 AM
Jonas
0
It's not working
4th Aug 2018, 12:21 PM
Jonas
0
What do you mean?
4th Aug 2018, 2:33 PM
Jonas
0
I not ned it I tested it on another web and it's working IT'S AN BUG ON SOLOLEARN!!!
4th Aug 2018, 2:44 PM
Jonas
4th Aug 2018, 5:57 PM
Jonas
0
it's an code to hacker terminal callenge
4th Aug 2018, 6:01 PM
Jonas
0
i tested it's not work
4th Aug 2018, 9:09 PM
Jonas