Help for Running Code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Help for Running Code

I don’t know what the error is but the code in not running nor showing any errors. Since I’m a beginner to JS I don’t know how to debug either so it would be great help if anyone tell me what the problem is please! Btw thanks for stopping and taking a look at my doubt! Thanks in advance 😊🙌🏻👋🏻 https://code.sololearn.com/Wi7RvF3VY6C2/?ref=app

8th May 2018, 1:35 PM
Raaja Thalapathy
Raaja Thalapathy - avatar
8 Answers
+ 8
Buttons cant submit forms Change type="button" to type="submit"
8th May 2018, 1:38 PM
Toni Isotalo
Toni Isotalo - avatar
+ 6
Of course. I scroll recent posts every day.
8th May 2018, 1:42 PM
Toni Isotalo
Toni Isotalo - avatar
+ 3
Thanks man and your code looked simple, nice & crisp 👌🏻🙌🏻😁
8th May 2018, 5:05 PM
Raaja Thalapathy
Raaja Thalapathy - avatar
+ 2
OMG it worked thanks a lot brother @Toni Isotalo 😁🙌🏻🙏🙏
8th May 2018, 1:39 PM
Raaja Thalapathy
Raaja Thalapathy - avatar
+ 2
@Toni Isotalo can I tag you in a question in the near future if I have any doubts please? 😊😇😇
8th May 2018, 1:40 PM
Raaja Thalapathy
Raaja Thalapathy - avatar
+ 2
Thanks a lot @Toni Isotalo 🙌🏻😇
8th May 2018, 1:43 PM
Raaja Thalapathy
Raaja Thalapathy - avatar
+ 1
The code is right, the SoloLearn processor that failed. I tried on another and it worked.
8th May 2018, 3:15 PM
Arthur Bacci
Arthur Bacci - avatar
+ 1
My version of code: <!DOCTYPE html> <html> <head> <title>CheckBox Validation</title> <meta charset="UTF-8"/> <style> input { background-color: orange; border-color: lightsalmon; } </style> </head> <body> <h3>A Form</h3> <form> <input type="checkbox" id="javascript" value="JavaScript" />JavaScript<br /> <input type="checkbox" id="angularjs" value="AngularJs" />AngularJS<br /> <input type="checkbox" id="nodejs" value="NodeJs" />NodeJS<br /> <input type="checkbox" id="jquery" value="JQuery" />JQuery<br /> <input type="submit" value="Submit" onclick="validate()"/><br/> <span id="output"></span> </form> <script> function validate() { var js = document.getElementById("javascript").checked; var ajs = document.getElementById("angularjs").checked; var njs = document.getElementById("nodejs").checked; var jq = document.getElementById("jquery").checked; if(js || ajs || njs || jq) { document.getElementById("output").innerHTML = "Validation Is Successful"; } else { document.getElementById("output").innerHTML = "Please Select At Least One Programming Language"; } } </script> </body> </html>
8th May 2018, 3:22 PM
Arthur Bacci
Arthur Bacci - avatar