View Single Post
Old 12-17-2012, 01:51 AM   PM User | #11
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,587
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by itxtme View Post
Each product has a check box that by default will be checked, instead of the user having to click on the check box I want them to be able to click on the href encasing the name of the product.
I’m sorry but I have to ask again: what is the point of the href attribute in a link if you’re not referencing (linking to) any document? I would say: there is no point, therefore there is no point in using an anchor element in the first place.

That said, I don’t get the point of the whole thread here if all you wanna do it click on a text string and want to check/uncheck a checkbox because that’s exactly what the <label> element is doing. Why make things so complicated?

Code:
<input type="checkbox" id="example">

<label for="example">Label for the checkbox which, if clicked, will toggle the checked state thereof</label>
alternatively you can put the input inside the label element:
Code:
<label><input type="checkbox"> If this text inside the label element is clicked the checkbox will be checked/unchecked</label>
__________________
Don’t click this link!

Last edited by VIPStephan; 12-17-2012 at 01:55 AM..
VIPStephan is offline   Reply With Quote