datestr += '<option value="" selected>-mmm-</option>';
datestr += '<option value="01">Jan</option>';
datestr += '<option value="02">Feb</option>';
datestr += '<option value="03">Mar</option>';
datestr += '<option value="04">Apr</option>';
datestr += '<option value="05">May</option>';
and case "alphanumhyphen":
if(l_str.length >0 && l_str.search("[^A-Za-z0-9\-_]") >= 0 ){
if(p_alertFlg){
alert( p_fldTitle +" should contain Alphabets or Numbers or - or _");
}
return "alphanumhyphen";
}
break;
case "numeric":
if(l_str.length >0 && l_str.search("[^0-9]") >=0 ){
if(p_alertFlg){
alert( p_fldTitle +" should contain Numbers");
}
return "numeric";
}
break;
case "decimal":
if(l_str.length >0 && l_str.search("[^0-9.]") >=0 ){
if(p_alertFlg){
alert( p_fldTitle +" should be Numeric.");
}
return "decimal";
}
break;
What is the correct term to describe this type of code?I used to call it "Spaghetti Code". But I recently learned that it's incorrect. "Spaghetti Code" only refers to programs with messy and unclear control flows (especially unstructured programs that abuse goto), it's not the correct term for code with useless repetitions.