Can somebody else please help me !? How can i improve to hide the true and false content with boolean 🤔🤔 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Can somebody else please help me !? How can i improve to hide the true and false content with boolean 🤔🤔

14th Nov 2020, 9:51 PM
Riselda Rada
Riselda Rada - avatar
12 Answers
+ 2
Riselda Rada for example <input type="radio" name="city" id="Paris" onclick = "function()" value="true"/> Paris<br/> As said here I am not using the submit if you wanna use the submit use the onclick on the submit tag not the radio tag. And very good reference is the w3school website.just write onclick in js w3school and it will show you how to do it
14th Nov 2020, 10:25 PM
Khaled ^^ خالد القريشي‎
Khaled ^^ خالد القريشي‎ - avatar
+ 4
Now in front of my input type="radio" ... i should use Onclick=function() ? Thank you very much for helping me🤗
14th Nov 2020, 10:19 PM
Riselda Rada
Riselda Rada - avatar
+ 4
Okay i am using your help and i am removing the submit . A lot of thanks for you🤗
14th Nov 2020, 10:26 PM
Riselda Rada
Riselda Rada - avatar
+ 3
Riselda Rada do you mean when click in the right answer, a message of True will appear and if it is wrong it will be false?
14th Nov 2020, 10:09 PM
Khaled ^^ خالد القريشي‎
Khaled ^^ خالد القريشي‎ - avatar
+ 3
Yes this is what i ment ! I really don't know what to do . If you could look to my page i post my code and it's not working😣
14th Nov 2020, 10:14 PM
Riselda Rada
Riselda Rada - avatar
+ 2
Riselda Rada so you need to use onclick and also try to use functions, so in your radio button tag add the Onclick =function(). Here you are saying if someone click on this answer call the function. Thus function you should write it and it is just if statement. Note I am not using submit. But if you wanna use submit you add the Onclick in your submit tag
14th Nov 2020, 10:17 PM
Khaled ^^ خالد القريشي‎
Khaled ^^ خالد القريشي‎ - avatar
+ 2
Hi , hope you're well . Would i get your help again please ? I did these steps that you told me but it's not working🙁 What should i do now ?
15th Nov 2020, 9:16 AM
Riselda Rada
Riselda Rada - avatar
+ 2
Okay , thanks are not enough for you🙏🏻
15th Nov 2020, 1:46 PM
Riselda Rada
Riselda Rada - avatar
+ 2
booleanVariable =!true this peice of code always changes value of the boolean to the opposite it's very useful
16th Nov 2020, 7:47 PM
D_Stark
D_Stark - avatar
+ 1
Riselda Rada let me know if you need more help ^^
14th Nov 2020, 10:25 PM
Khaled ^^ خالد القريشي‎
Khaled ^^ خالد القريشي‎ - avatar
+ 1
Riselda Rada okay, I saved it to my profile, I will work on it there
15th Nov 2020, 12:23 PM
Khaled ^^ خالد القريشي‎
Khaled ^^ خالد القريشي‎ - avatar
+ 1
Riselda Rada it is working now
15th Nov 2020, 1:59 PM
Khaled ^^ خالد القريشي‎
Khaled ^^ خالد القريشي‎ - avatar