Issue
I want to disable all the elements inside Fieldset but enable few buttons inside it. Demo:
<fieldset ng-disabled="true">
<legend>Personalia:</legend>
Name: <input type="text"><br>
Email: <input type="text"><br>
Date of birth: <input type="text">
<input type="button" value="See More (Enable this!!) " ng-click="ButtonClicked1()" ng-disabled="false"/>
Somethingelse: <input type="text">
<input type="button" value="View Details " ng-click="ButtonClicked2()"/>
</fieldset>
Solution
Try this:
DEMO
HTML:
<fieldset id="form">
<legend>Personalia:</legend>
Name: <input type="text" /><br />
Email: <input type="text" /><br />
Date of birth: <input type="text" />
<input id="btn1" type="button" value="See More (Enable this!!) " onclick="ButtonClicked1()" />
Somethingelse: <input type="text" />
<input type="button" value="View Details " onclick="ButtonClicked2()"/>
</fieldset>
SCRIPT:
$('#form :input').prop('disabled', true);
$("#btn1").prop('disabled', false);
Answered By - Suganth G
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.