/** * Qna 등록 */ insertQna = function() { var qnaForm = nv.$('qnaForm'); var validator = new nv.Validator(qnaForm, globalCommon.alertMsg); var userName = nv.$('userName'); if(userName) { validator.checkRequired('userName', 'Please enter your full name.', true); validator.checkMaxLength('userName', 30, 'You full name max length is 30 byte.', true); } var email = nv.$('email'); if(email) { validator.checkRequired('email', 'Please enter your E-mail address to receive our response.', true); validator.checkMaxLength('email', 50, 'email address max length is 50 byte.', true); validator.checkEmail('email', 'email address is invalid.', true); } var title = nv.$('title'); if(title) { validator.checkRequired('title', 'Please enter ‘Title’.', true); validator.checkMaxLength('title', 100, 'Title max length is 100 byte.', true); } var content = nv.$('content'); if(content) { validator.checkRequired('content', 'Please enter ‘Content’.', true); validator.checkMaxLength('content', 3000, 'Content max length is 3000 byte.', true); } if(!validator.validate()) return; globalCommon.alertScriptConfirm("Are you sure you want to send this inquiry?", "", "javascript:submitForm(); nv.LBox.off();", "javascript:nv.LBox.off()", "cancel"); } var GLOBAL_VAL_COUNTSUBMIT = 0; function submitForm() { if(GLOBAL_VAL_COUNTSUBMIT == 0){ GLOBAL_VAL_COUNTSUBMIT = 1; var qnaForm = nv.$('qnaForm'); qnaForm.action = 'qna.write.do'; qnaForm.submit(); } } /* * 취소 */ cancleQna = function() { globalCommon.alertScriptConfirm("You will lose unsaved data.
Are you sure you want to continue?", "continue", "javascript:history.back()","javascript:nv.LBox.off()","cancel"); }