Jump to content

The Checkbox Element.


atar.yosef
 Share

Recommended Posts

Hello to the fellows!!! :)

<p>Which colors do you love?</p><p>Blue<input name="color" type="checkbox" value="blue" /><br />Red<input name="color" type="checkbox" value="Red" /><br />Brown<input name="color" type="checkbox" value="Brown" /><br />All of the above<input name="color" type="checkbox" value="All" /></p>

I want to know please, how can I cause, that if I check the "all of the above" checkbox, this will cause to checking of all the checkboxes with the same name.In addition I want to know, if this feature can be used with HTML code only, or this is necessary to be used with Javascript (that I didn't learn it still).Watch for your response!!!

Link to comment
Share on other sites

You could do it with radio buttons, since one radio button affects other buttons with the same name. Checkboxes are independent. To do it with checkboxes, you would need JavaScript.
:) Excuse me, but I think you are not correct because that with radio buttons you cannot check all the radio buttons by checking one of them. inversely, when you check one of them, you "discheck" all of the remains with the same name, and I want to know how to check all the buttons (of checkboxes) by checking only one of them and this will affect on all of the remains to be check.
Link to comment
Share on other sites

That's true. I did not see a reason for checking all the boxes if one box plainly says "All of the above." And I was trying to make the solution as easy as possible. To get what you want, the answer is JavaScript. Have a nice day. :)

Link to comment
Share on other sites

That's true. I did not see a reason for checking all the boxes if one box plainly says "All of the above." And I was trying to make the solution as easy as possible. To get what you want, the answer is JavaScript. Have a nice day. :)
Oh yeah, very thanks you Deirdre's Dad, you are very help me!! :):)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...