i have a table that has a check box and a select box. if a checkbox is clicked then i dont need the select box and if the select box is selected i dont need the check box.
this is my html code:
newcontent += Hesto.Html.CreateTD('<input type="CheckBox" name="PresentCheckBox" class="myCheckBox" value="true" onclick=Result(); ');
// newcontent += Hesto.Html.CreateTD('<input type="CheckBox" onClick=KeepCount() class= "group1" />');
newcontent += Hesto.Html.CreateTD('<Select id="selectbox" > <option value=-1>please select an item</option><option>Milk</option><option>Bread</option><option>Cake</option></Select>');
newcontent = Hesto.Html.EndTR(newcontent);
}
});
$('#Employee').html(newcontent);
and this is my function.
function Result() {
var checkbox = $('input[type=CheckBox]');
if ($('input[name=PresentCheckBox]:checked')) {
$("#selectbox").disabled = true;
};
when i click the checkbox it doesnt disable my select box.