-
Oct 8th, 2014, 06:41 AM
#1
-
Oct 8th, 2014, 07:59 AM
#2
Re: Check box bad behavior
I think it is because these checkboxes are in a label - seems you can only have one checkbox in a label.
-
Oct 8th, 2014, 09:53 AM
#3
Re: Check box bad behavior
Made the outer container a DIV - fixed the problem. Marking this resolved!
-
Oct 8th, 2014, 10:54 AM
#4
Re: [RESOLVED] Check box bad behavior
Not sure if it matters in your job, but accessibility guidelines state you must have labels wrapped around all text associated with a textbox. Otherwise web-readers have issues navigating the site.
So looking at your code, it should really be:
Code:
Presentation per providers
<br>
<br>
<label for="1"><input type="checkbox" value="1" name="1" id="1">
Anger</label>
<br>
<label for="2"><input type="checkbox" value="2" name="2" id="2">
Compulsions</label>
<br>
<label for="3"><input type="checkbox" value="3" name="3" id="3">
Delusions</label>
etc
You can also wrap it around just the text, and not the textbox, but I do the former because of bootstrapisms.
-
Oct 8th, 2014, 12:03 PM
#5
Re: [RESOLVED] Check box bad behavior
Yeah - I've read about that as I just learned the purpose of a LABEL around a CHECKBOX. I don't really have to deal with these issues - although I probably should.
I just happened to use a label since my jQuery code was only linking the database calls to things like LABELS, TEXTBOXES (I auto-bind the FIELD NAME to a CLASS-name I put on items - that was the AWC-MESSAGE1 class)
I changed it to a DIV - altered some of my code to like that DIV - and it's working now.
The problem I have with those CHECKBOXES setup like you indicate is that a user can open many tabs at once for different participants. I would have to name them really strangely to get them unique - like with the PARTICIPANT ID as part of the NAME and FOR links.
-
Oct 8th, 2014, 05:43 PM
#6
Re: [RESOLVED] Check box bad behavior
When placing the <input> inside a <label> you don't need the "for" attribute, so you can also remove the id attributes on your <input> controls.
http://dochub.io/#html/label
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|