InnerText is not podstavlyaet Tex span. What could be the reason?

In the console error "Uncaught TypeError: Cannot set property 'innerText' of null". Neither innerText nor innerHtml are not working. Wrap the function in onload doesn't work either. What could be the reason?
https://jsfiddle.net/9hqwrfnc/1/
June 5th 19 at 21:39
3 answers
June 5th 19 at 21:41
Solution
1. You are trying to get the selector field-name__clb, and the HTML code you have defined .field-name__clb
2. The code is missing a function call fieldsName
3. document.querySelector only selects the first element that matches a certain group of selectors
Thank you very much! Worked. Only somehow gets a single value from the array, the last... - nikita.Stracke commented on June 5th 19 at 21:44
and what result do you want? - Lenny.Botsfo commented on June 5th 19 at 21:47
below each span is output in order one element of the array - nikita.Stracke commented on June 5th 19 at 21:50
you should use document.querySelectorAll and similarly to refer to the sample elements by index. - Lenny.Botsfo commented on June 5th 19 at 21:53
In a nested fauré email
callbackField.innerText += name; remove 2 extra span - Isom.Balistreri commented on June 5th 19 at 21:56
wrong. so the whole text will be in the first span. And the nested for does not need. - Lenny.Botsfo commented on June 5th 19 at 21:59
if you give up or want to check your solution, here solution. - Lenny.Botsfo commented on June 5th 19 at 22:02
all the problem is solved, it worked, thank you very much for hints,without You would have failed! - nikita.Stracke commented on June 5th 19 at 22:05
works don't touch - Isom.Balistreri commented on June 5th 19 at 22:08
in this case, only pretends to be working, from time to time. You want to stylize the elements as your error immediately POPs out. - Lenny.Botsfo commented on June 5th 19 at 22:11
let then write about it if you want - Isom.Balistreri commented on June 5th 19 at 22:14
and why you function in the round brackets placed? - Cielo_Ritch commented on June 5th 19 at 22:17
, sloveniaas function. You can and so change.

I did not understand you. If you insist that your tip with the concatenation has the right to life, I do not agree with you. It's not even a decision because the result is different from expected and doesn't solve the problem.
On this site people still help each other, and not Vice versa. - Lenny.Botsfo commented on June 5th 19 at 22:20
cool, thank you!!! - Cielo_Ritch commented on June 5th 19 at 22:23
June 5th 19 at 21:43
you have the wrong indication of the class in querySelector
June 5th 19 at 21:45

Find more questions by tags JavaScript