maddisoncr
asked on
Disabled Fieldset Attribute in HTML5
Hi
I have a form (as below) and depending on whether it's in edit mode or view mode I lock the form elements. This is fine. The issue i have is with ie 9 which doesnt support the html5 disabled attribute
whats the best way of going about this, what kind of polyfill would i need ?
(I am using bootstrap 3)
I have a form (as below) and depending on whether it's in edit mode or view mode I lock the form elements. This is fine. The issue i have is with ie 9 which doesnt support the html5 disabled attribute
whats the best way of going about this, what kind of polyfill would i need ?
(I am using bootstrap 3)
<fieldset disabled>
<div class="form-group">
<label for="clientname" class="col-lg-2 control-label">Company Name</label>
<div class="col-lg-10">
<input title="The name of the Client" value="<?php echo $ClientName?>" type="text" class="form-control initial_caps" id="clientname" placeholder="The name of the Client" name="clientname" >
</fieldset>
Perhaps you can disabled the first div in the fieldset...
Hi,
you might try this jQuery function:
This should disable all input fields in your fieldset.
HTH
Rainer
you might try this jQuery function:
var disabledFieldset = $('fieldset[disabled]');
$('input', disabledFieldset).attr('disabled', 'disabled');
This should disable all input fields in your fieldset.
HTH
Rainer
ASKER
thanks guys
that will work for browsers that support 'disabled' but i'm led to believe that ie 9 doesn't.
how would i go around testing to see if the browser supports the attribute..
i'm from a vb.net backround so i'm quickly learning the ropes. i did think modernizr but that doesn't check for the disabled attr..
any ideas
thanks again for your help
that will work for browsers that support 'disabled' but i'm led to believe that ie 9 doesn't.
how would i go around testing to see if the browser supports the attribute..
i'm from a vb.net backround so i'm quickly learning the ropes. i did think modernizr but that doesn't check for the disabled attr..
any ideas
thanks again for your help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help