atar.yosef Posted November 15, 2009 Share Posted November 15, 2009 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 More sharing options...
jeffman Posted November 15, 2009 Share Posted November 15, 2009 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. Link to comment Share on other sites More sharing options...
atar.yosef Posted November 16, 2009 Author Share Posted November 16, 2009 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 More sharing options...
jeffman Posted November 16, 2009 Share Posted November 16, 2009 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 More sharing options...
atar.yosef Posted November 16, 2009 Author Share Posted November 16, 2009 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.