Reputation: 77
Ho to make the button unclick able except after checked one of radio button? Please Help Me!
I HAve tried code below :
if(!radiobutton.isChecked){
button.setVisible(false);
}
But its not help me.. anyone can solve my problem?
Upvotes: 0
Views: 2393
Reputation: 19
Hi you can disable other radio buttons if one is selected by giving same name attribute to all radio buttons.
<input type = "radio" name = "tiger"><label>Option A</label>
<input type = "radio" name = "tiger"><label>Option B</label>
<input type = "radio" name = "tiger"><label>Option C</label>
If you chose option A,other radio buttons will be deactivated.
Upvotes: 1
Reputation: 1260
Try this out
<div>
<input type="checkbox" id="checkit" />
<input type="button" value="click" id="click" />
</div>
Js:
var check = $("#checkit");
$("#checkit").on('click',checkStatus);
function checkStatus(){
if(check.is(':checked'))
{
$("#click").prop('disabled', true);
}
else{
$("#click").prop('disabled', false);
}
}
Upvotes: 0
Reputation: 3498
If you want to make the button unclickable, try
button.Enabled = false;
Upvotes: 0