Hello everyone,
I have searched and tried many different "solutions" but none have worked out yet for me. I am using JQuery and JQuery UI. I have several rows in a form and at the start of each row I have a check box that, once checked, enables the rest of the elements within that row. The problem is that the check box doesn't enable the radio set or the input box that I have.
If I convert the check box to just a button, it works great, but not as a check box. Here is my JQuery code:
$( ".Account" ).attr('disabled', 'disabled').button('refresh');
$("#InputAD").click(function() {
var jq = $("#InputADID, #InputADAction1, #InputADAction2, #InputADAction3,);
if (jq.filter(":disabled").length)
jq.removeAttr('disabled').button('refresh');
else
jq.attr('disabled', 'disabled').button('refresh');
return false;
});
Now for the HTML code that DOES work:
<button id="InputAD" name="InputAD"><label for="InputAD">Active Directory</label>
<input type="text" id="InputADID" name="InputADID" placeholder="Username" maxlength="50" class="Account">
<input type="radio" id="InputADAction1" name="InputADAction" checked="checked" class="Account"/><label for="InputADAction1">Add Account</label>
<input type="radio" id="InputADAction2" name="InputADAction" class="Account" /><label for="InputADAction2">Modify Account</label>
<input type="radio" id="InputADAction3" name="InputADAction" class="Account" /><label for="InputADAction3">Already Done</label>
The problem is that I really need to have a check box rather then a button to start each row (for visual reasons and for the way my ASP works). If I put in the following code instead of the button line it doesn't work. The check box highlights just fine, but doesn't enable the rest of the row:
<input type="checkbox" id="InputAD" name"=InputAD" /><label for="InputAD">Active Directory</label>
Any ideas on what I'm doing wrong or other ways to handle this?