What I wanna ask is, I have a check box called full screen and when I checked it the two input fields which are width and height should be disabled and the values of it set to null. I do it well with j query but when I submit the form with full screen checked even the two input fields values are 0, it is saving with previous values of that two input fields.
Any help?
$("#fullscreenCheckBox").on("change", function() {
if($(this).prop("checked")) {
$("#height").prop("disabled", true);
$("#height").val("");
$("#width").prop("disabled", true);
$("#width").val("");
} else {
$("#height").prop("disabled", false);
$("#height").prop("disabled", false);
}
});
The values are set to null as its but when the form is submitted it doesnt keep it