pmingione
-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by pmingione
-
-
Thanks to all of the "GREAT MINDS" that solved my problem.
-
Hi All,I'm sure this is a relatively simple problem. I hope someone with more javaScript knowledge than me can solve it. I need to be able to iterate with a for-loop over all of the input check-boxes in this table row to determine if any are checked. <tr id="hurricane_damage"><td valign="top" width="183"><span id="label_courses">What type of damage did your business incur as a result of Hurricane Sandy? Please check all that apply:*</span></td><td valign="top" colspan="2" width="366"><div><input id="subform_hurricane_damage_1" type="checkbox" value="Fire" name="Huricane Damage"/><span><b>Fire</b></span></div><div><input id="subform_hurricane_damage_2" type="checkbox" value="Flooding"/><span><b>Flooding</b></span></div><div><input id="subform_hurricane_damage_3" type="checkbox" value="Wind Damage"/><span><b>Wind Damage</b></span></div><div><input id="subform_hurricane_damage_4" type="checkbox" value="Inventory Loss"/><span><b>Inventory Loss</b></span></div><div><input id="subform_hurricane_damage_5" type="checkbox" value="Other" onclick="showHideOther()"/><span><b>Other</b></span></div><span id="hurricane_damage_errMsg" class="hide">Please choose at least one category.</span></td></tr> My problem is I don't know how to detect the number of check-boxes in the table row so that the for loop can terminate. (Each table row in the form will not necessarily have the same number of check boxes.)i.e.for(var i = 0; i == number_of_check_boxes; i++) Either a javaScript or a jQuery solution would be acceptable.Thanks in advance.
-
Thank you all for the explainations.
-
Hi All, I've recently encountered this line of javaScript code. return (controlName.attr('type') || controlName[0].tagName).toLowerCase(); I haven't ever seen this structure before. Can anybody explain it to me. I am confused as to what the or ( || ) is doing. One of the two strings ( either controlName.attr('type') or controlName[0].tagName) is being processed by the toLowerCase() library function. But I am unsure of what the procedure is. If the object has both a type attribute and a tag name then what is actually being returned? Thanks PMingione
Problems creating a table-less web page design
in HTML/XHTML
Posted