greatfalls
Technical User
I have the following functin in a form. I need to make it so that any percent greater then 10.00 (10 percent) doesn't get submited, and a alert apears instead.
Any help would be appreciated, Thanks
function chkIncrease(fld) {
var str = fld.value.replace(/\s/g,'');
if (str.length==0) return true;
if (str.length <10) return true;
if (!/^[0-9]{1,2}\.?[0-9]?$/.test(str)) {
window.alert("This must be in 99.9 format."
;
fld.focus();
fld.select();
return false;
}
Any help would be appreciated, Thanks
function chkIncrease(fld) {
var str = fld.value.replace(/\s/g,'');
if (str.length==0) return true;
if (str.length <10) return true;
if (!/^[0-9]{1,2}\.?[0-9]?$/.test(str)) {
window.alert("This must be in 99.9 format."
fld.focus();
fld.select();
return false;
}