This works in Firefox. How can I make it work in IE7?
$( '#addressSection input:radio' ).attr( 'disabled', false );
I've also tried these to no avail:
$( '#addressSection input:radio' ).removeAttr( "disabled" );
$( '#addressSection input:radio' ).attr( 'disabled', 'false' );
$( '#addressSection input:radio' ).attr( {disabled: false} );
$( '#addressSection input:radio' ).attr( {disabled: 'false'} );
Here's the radio button html as it is rendered by IE7. The original is written in Spring and custom tags.
<div id="addressSection">
<div class="column">
<ul class="simpleForm">
<li>
<input id="addressUseUorA" name="addressUseUorA" value="U" type="radio" type="text" value=""/>
<label for="addressUseUorA">Use User Address</label>
<input id="addressUseUorA" name="addressUseUorA" value="A" type="radio" type="text" value=""/>
<label for="addressUseUorA">Use Account Address</label>
</li>
</ul>
</div>
</div>
UPDATE:
Here's what was causing the issue.
I disabled the field like this, trying to disable all fields in the DIV:
$( '#addressSection' ).attr( 'disabled', true);
This causes an issue in ie7, but not firefox.
The issue was resolved when I changed the disable code to:
$( '#addressSection input' ).attr( 'disabled', true);
my guess is that the disable attribute was applied to the div and not the field and so could not be removed by referencing the radio button.
Thanks for all of the help.
did you try:
$( '#addressSection input[type="radio"]' ).removeAttr( "disabled" );
Try:
$('#addressSection input[type=radio]').attr('disabled', false);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With