0

Can someone tell me why isn't this code working.

https://code.sololearn.com/WwS8rfW43S3E/?ref=app

26th Mar 2018, 8:59 PM
bhatti abdullah
bhatti abdullah - avatar
5 Answers
+ 1
1. change the callback arguments for every onclick to: this (small t) NOT This (capital t); 2. initialize the inputLbel after the document loads: var inputLbel; window.onload = function(){ inputLbel = document.getElementById("inputLbel"); } 3. sometimes you wrote inputLble and inoutLble instead of inputLbel. Correct those; If you do that it should work. Hope I helped : )
26th Mar 2018, 9:13 PM
Ulisses Cruz
Ulisses Cruz - avatar
+ 1
Adam is correct. Change "This" to "this" inside your calls to the onclick functions.
26th Mar 2018, 9:15 PM
Zeke Williams
Zeke Williams - avatar
+ 1
I should have been more clear. Change it in the HTML.
26th Mar 2018, 9:32 PM
Adam
Adam - avatar
+ 1
thanx it works 😀😀😀
26th Mar 2018, 10:07 PM
bhatti abdullah
bhatti abdullah - avatar
0
All but the top 2 calls to pushButton reference This with a capital T. Javascript is case sensitive. You need this with a lowercase t. That's why it throws the undefined error for This.
26th Mar 2018, 9:11 PM
Adam
Adam - avatar