@SempervivumSep 19.2019 — #You better post code in as text in code tags: `your code here`, not as screenshots.
And I recommend using meaningful names instead of x, y, z, a, b.
I cannot spot any error in the last line of code. Did you place the javascript [b]below[/b] the HTML? If not, the DOM elements do not yet exist and getElementById will return null.