0
Can ya all please point out whats wrong with this code?
I want to select a button and when i submitt it it displays the selected button . https://code.sololearn.com/WN55oIc9L9m7/?ref=app
5 odpowiedzi
+ 2
Hi Rio : It looks like you got some help from the community. I applied many of the corrections to see if I could get it to work with their suggestions. But in the end I discovered an easier way with less code.
Let me know if this helps.
https://code.sololearn.com/WGhog17fIpVR/?ref=app
+ 3
Seems like the function's name "click" is in conflict with something else. Just change the name.
Another problem is click(){...} instead of function(){...} in the argument list.
Also getElementByClassName doesn't exist.
These are just some of the errors, you'll have to spend some time debug your code.
+ 2
Some issue:
* line 13: let i = 0
* line 14: addEventListener
* you don't close the function definition of click
* you try to add click() inside of the function definition of click()
* you try to attach the same function twice to the buttons: once in html, once via js
+ 1
If you want to have so.e rating questionnaire consider using radio buttons for simplicity
0
Hey Chris
Been having a problem implementing the suggesions Thankyou for your help,it worked😊