/** * EUC-KR * ´ñ±Ûó¸® ¶óÀ̺귯¸® */ var obj_check = ''; function checkUser(obj) { if(commentForm.mCode.value == '') { alert('·Î±×ÀÎ ÈÄ¿¡ ÀÌ¿ëÇÒ ¼ö ÀÖ´Â ¼­ºñ½ºÀÔ´Ï´Ù.'); return; } $(obj).focus(); } function getStringByteSize(str) { var str,msg; var len = 0; var temp; var count = 0; len = str.length; for (var k=0 ; k 4) { count += 2; } else if (temp == '\r' && str.charAt(k+1) == '\n') { // \r\nÀÏ °æ¿ì count += 2; } else if (temp != '\n') { count += 1; } } return count; } function getStringSize(obj) { if($(obj).attr('id') == 'commt_write') $("#strSize").text($(obj).val().length); else $("#strSize2").text($(obj).val().length); } function getStringMaxCheck(obj, lenMax) { var str = $(obj).val(); if(lenMax < str.length) { alert(lenMax+"ÀÚÀ̳»·Î ÀÛ¼ºÇϼžßÇÕ´Ï´Ù."); $(obj).val($(obj).val().substring(0,200)); $(obj).focus(); } } function comment_edit(obj,rcode) { var next_html = $(obj).parent().next().html(); if(!(obj_check == obj)) { if($("#commt_edit").html() != null) $($($("#commt_edit").parent().parent().parent().parent().parent().get(0)).children().get(4)).remove(); var inHtml = ""+ " "+ " "+ " "+ " "+ "

("+next_html.length+"/200ÀÚ)
"; $(obj).parent().parent().append($("

("+next_html.length+"/200ÀÚ)
")); obj_check = obj; } else { $($($("#commt_edit").parent().parent().parent().parent().parent().get(0)).children().get(4)).remove(); obj_check = ''; } parent.Resize_Frame('comtIframe'); } function comment_write() { if(commentForm.mCode.value == '') { alert('·Î±×ÀÎ ÈÄ¿¡ ÀÌ¿ëÇÒ ¼ö ÀÖ´Â ¼­ºñ½ºÀÔ´Ï´Ù.'); return; } if(commentForm.aCode.value <= 2000 ) { alert('½Ç °èÁ¤¸¸ ÀÌ¿ë°¡´ÉÇÑ ¼­ºñ½ºÀÔ´Ï´Ù.'); return; } if($("#commt_write").val() == '') { alert('ÀÇ°ßÀ» ÀÔ·ÂÇØÁֽʽÿÀ.'); $("#commt_write").focus(); return; } if($("#commt_write").val() == '¡Ø 20 ~ 200ÀÚ À̳»·Î ÀÔ·ÂÇØÁÖ¼¼¿ä.') { alert('ÀÇ°ßÀ» ÀÔ·ÂÇØÁֽʽÿÀ.'); $("#commt_write").focus(); return; } if($("#commt_write").val().length < 20) { alert('20ÀÚ ÀÌ»ó ÀÔ·ÂÇØÁֽʽÿÀ.'); $("#commt_write").focus(); return; } commentForm.action='/global/comment?action=writeAction'; commentForm.submit(); } function comment_update(rcode) { if(commentForm.mCode.value == '') { alert('·Î±×ÀÎ ÈÄ¿¡ ÀÌ¿ëÇÒ ¼ö ÀÖ´Â ¼­ºñ½ºÀÔ´Ï´Ù.'); return; } if($("#commt_edit").val() == '') { alert('ÀÇ°ßÀ» ÀÔ·ÂÇØÁֽʽÿÀ.'); $("#commt_edit").focus(); return; } if($("#commt_edit").val().length < 20) { alert('20ÀÚ ÀÌ»ó ÀÔ·ÂÇØÁֽʽÿÀ.'); $("#commt_edit").focus(); return; } var query = "&kCode="+commentForm.kCode.value+"&bCode="+commentForm.bCode.value+"&mCode="+commentForm.mCode.value+"&mkCode="+commentForm.mkCode.value+"&rCode="+rcode+"&commt_edit="+escape(encodeURIComponent($("#commt_edit").val())); $.ajax({ type: "POST", url: "/global/comment", data: "action=updateAction"+query, success: function(msg){ if($(msg).find("result").text() == 'OK') { $($($("#commt_edit").parent().parent().parent().parent().parent().get(0)).children().get(3)).html($("#commt_edit").val()); $($($("#commt_edit").parent().parent().parent().parent().parent().get(0)).children().get(4)).remove(); obj_check = ''; parent.Resize_Frame('comtIframe'); alert('ÀÛ¼ºÇÑ ÀÇ°ßÀÌ ¼öÁ¤µÇ¾ú½À´Ï´Ù.'); } } }); } function comment_delete(rcode) { if(commentForm.mCode.value == '') { alert('·Î±×ÀÎ ÈÄ¿¡ ÀÌ¿ëÇÒ ¼ö ÀÖ´Â ¼­ºñ½ºÀÔ´Ï´Ù.'); return; } if(confirm('Á¤¸» »èÁ¦ ÇϽðڽÀ´Ï±î?')) { commentForm.rCode.value=rcode; commentForm.action='/global/comment?action=deleteAction'; commentForm.submit(); } } function comment_delete2(rcode) { if(confirm('Á¤¸» »èÁ¦ ÇϽðڽÀ´Ï±î?')) { commentForm.rCode.value=rcode; commentForm.action='/global/comment?action=deleteAction'; commentForm.submit(); } }