In my jsp page, 1 checkbox, 2 textbox and 1 submit button. The checkbox is used for enabling and disabling the text box. Data saved when textbox is enable but not saved when textbox is disable.
following code is for toggle.
function toggleFields(status){
if (status==false){
$("#textbox1").removeAttr("disabled");
$("#textbox2").removeAttr("disabled");
}
else {
$("#textbox1").attr("disabled", "disabled");
$("#textbox2").attr("disabled", "disabled");
}
}
please help me in this.