Jquery Validation when all enabled fileds are not empty -
please me following using jquery.
condition 1: how can check if fields(input, textarea, select) enabled not empty or has selected value.
condition 2: fields disabled not included in validation on condition 1.
ive tried lot of codes , code below seems do, captures fields including disabled.
$('#btnsave').click(function (e) { $('input:enabled:not([readonly])').each(function () { if ($(this).val() == "") { alert("please fill out fields."); e.preventdefault(); return false; } else { addsomestuffs(); } }); });
can me on this.
thanks in advance.
Comments
Post a Comment