/* *************************************************************************** '* SOURCE NAME : filedCheck.js '* FIRST AUTHOR : °­ÇöÁÖ '* PROGRAMING DATE : 2006-07-18 '* DESCRIPTION : ÀÚ¹Ù ½ºÅ©¸³Æ® Çʵå üũ ÇÔ¼ö ¸ðÀÓ '*************************************************************************** '*************************************************************************** '* SYSTEM NAME GUIDANCE NAME DATE DESCRIPTION '*************************************************************************** */ /* ±ÛÀÚ Á¦ÇѼö¸¦ ÁöÁ¤ ÇÔ¼ö (by °­ÇöÁÖ 2006-07-18) - »ç¿ë¹æ¹ý : textLengthFix(°´Ã¼¸í, Á¦ÇѱÛÀÚ¼ö, ¸Þ¼¼Áö); */ function textLengthFix(objField, theLength, strMsg, theLang) { if (objField.value.length != theLength) { if (theLang=="kor") alert(strMsg + " " + theLength + "ÀÚ¸¦ ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù."); else alert("The "+ strMsg + " input " + theLength + " characters."); objField.focus(); return false; } return true; } /* ±ÛÀÚ Á¦ÇѼöÀÌ»ó üũ ÇÔ¼ö (by °­ÇöÁÖ 2006-07-18) - »ç¿ë¹æ¹ý : textLengthCheck(°´Ã¼¸í, Á¦ÇѱÛÀÚ¼ö, ¸Þ¼¼Áö); */ function textLengthCheck(objField, theLimit, strMsg, theLang) { if (objField.value.length < theLimit) { if (theLang=="kor") alert(strMsg + " " + theLimit + "ÀÚ¸® ÀÌ»ó ¼ýÀÚ·Î ÀÔ·Â ÇÏ¼Å¾ß ÇÕ´Ï´Ù"); else alert("The "+ strMsg + " do input with a number abnormal a " + theLimit + " seat."); objField.focus(); return false; } return true; } /* ±ÛÀÚ Á¦ÇѼöÀÌÇÏ Ã¼Å© ÇÔ¼ö (by °­ÇöÁÖ 2006-07-18) - »ç¿ë¹æ¹ý : textLengthLimit(°´Ã¼¸í, Á¦ÇѱÛÀÚ¼ö, ¸Þ¼¼Áö); */ function textLengthLimit(objField, theLimit, strMsg, theLang) { if (objField.value.length > theLimit) { if (theLang=="kor") alert(strMsg + " " + theLimit + "ÀÚ±îÁö¸¸ ¾µ ¼ö ÀÖ½À´Ï´Ù."); else alert(strMsg + " " + theLimit + " characters.") objField.value = objField.value.substring(0, theLimit); objField.focus(); return false; } return true; } /* ±ÛÀÚ Á¦ÇѼö¹üÀ§ üũ ÇÔ¼ö (by °­ÇöÁÖ 2006-07-18) - »ç¿ë¹æ¹ý : textLengthRange(°´Ã¼¸í, ÃÖ¼Ò ±ÛÀÚ¼ö, ÃÖ´ë±ÛÀÚ¼ö, ¸Þ¼¼Áö); */ function textLengthRange(objField, theMin, theMax, strMsg, theLang) { if (objField.value.length < theMin || objField.value.length > theMax) { if (theLang=="kor") alert(strMsg + " " + theMin + "~" + theMax + "ÀÚ¸¦ ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù."); else alert("The " + strMsg + " input between " + theMin + " to " + theMax + " characters"); objField.focus(); return false; } return true; } /* ÅؽºÆ® Çʵ忡 °ª ÀÔ·ÂÇß´ÂÁö ¿©ºÎ¿Í ¼ýÀÚ°ªÀÎÁö ¿©ºÎ üũ (by °­ÇöÁÖ 2006-07-18) - »ç¿ë¹æ¹ý : numericCheck(°´Ã¼¸í, ¸Þ¼¼Áö, theLang); */ function numericCheck(objField, strMsg, theLang){ //ÀԷ¿©ºÎ üũ if (textFieldCheck(objField, strMsg, theLang) == false) return false; //¼ýÀÚÀÎÁö üũ if (decimalFieldCheck(objField, strMsg, theLang) == false) return false; return true; } /* ÅؽºÆ® Çʵ忡 ¼ýÀÚ°ªÀÎÁö ¿©ºÎ üũ (by °­ÇöÁÖ 2006-07-18) - »ç¿ë¹æ¹ý : decimalFieldCheck(°´Ã¼¸í, ¸Þ¼¼Áö, theLang); */ function decimalFieldCheck(objField, strMsg, theLang){ if (!objField.value.checkNumeric()) { if (theLang=="kor") alert(strMsg + "´Â(Àº) ¼ýÀÚ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù."); else alert("Please Insert the " + strMsg + " certainly with number."); objField.focus(); objField.select(); return false; } return true; } /* ÅؽºÆ® Çʵ忡 °ª ÀÔ·ÂÇß´ÂÁö ¿©ºÎ üũ (by °­ÇöÁÖ 2006-07-18) - »ç¿ë¹æ¹ý : textFieldCheck(°´Ã¼¸í, ¸Þ¼¼Áö, theLang); */ function textFieldCheck(objField, strMsg, theLang){ if (objField.value.length == 0 || objField.value.split(" ").join("") == "" || objField.value.trim() == "") { if (theLang=="kor") alert(strMsg + "¸¦(À») ÀÔ·ÂÇϼ¼¿ä."); else alert("Please input the " + strMsg); objField.focus(); return false; } return true; } /* SELECT Çʵ忡 °ª ÀÔ·ÂÇß´ÂÁö ¿©ºÎ üũ (by °­ÇöÁÖ 2006-07-18) - »ç¿ë¹æ¹ý : selectFieldCheck(°´Ã¼¸í, ¸Þ¼¼Áö, theLang); */ function selectFieldCheck(objField, strMsg, theLang){ if (objField.selectedIndex == 0) { if (theLang=="kor") alert(strMsg + "¸¦(À») ¼±ÅÃÇϼ¼¿ä."); else alert("Please select the " + strMsg + " list"); objField.focus(); return false; } return true; } /* ¶óµð¿À³ª üũ¹Ú½º¿¡ °ª ÀÔ·ÂÇß´ÂÁö ¿©ºÎ üũ (by °­ÇöÁÖ 2006-07-18) - »ç¿ë¹æ¹ý : boxFieldCheck(°´Ã¼¸í, ¸Þ¼¼Áö, theLang); */ function boxFieldCheck(objField, strMsg, theLang){ var sCount = 0; for (var i=0;i=0;i--) { if (chk[i].type == "checkbox" && chk[i].name != "checkboxAll" && chk[i].checked == true) sCount++; } if (theLang=="kor"){ if (sCount == 0) { alert("\n"+strMsg+"ÇÒ Ç׸ñÀ» ¸ÕÀú ¼±ÅÃÇϼ¼¿ä.\n"); return; }else{ if (!confirm("\n¼±ÅÃÇϽŠÇ׸ñÀ» "+strMsg+" ÇϽðڽÀ´Ï±î?\n")) return; } }else{ if (sCount == 0) { alert("\n"+strMsg+"ÇÒ Ç׸ñÀ» ¸ÕÀú ¼±ÅÃÇϼ¼¿ä.\n"); return; }else{ if (!confirm("\n¼±ÅÃÇϽŠÇ׸ñÀ» "+strMsg+" ÇϽðڽÀ´Ï±î?\n")) return; } } Form.action =actionURL; Form.submit(); }