var CheckParent = false; $(document).ready(function() { CheckParent = false; $("#M_ID").focus(); }); // 추천 코드 입력 폼 보이기 function ShowCheckParent() { //return; if( CheckParent == false ) $("#divCheckParent").css( 'display', '' ); else $("#divCheckParent").css( 'display', 'none' ); CheckParent = ! CheckParent; } function HideCheckParent() { $("#divCheckParent").css( 'display', 'none' ); CheckParent = false; } function CheckParentCode() { var Value = $.trim( $("#M_PARENT").val() ); if( Value == '' ) { alert('추천인코드를 입력 하세요.'); $("#M_PARENT").focus(); return false; } $.ajax({ url : '/post/post_MemberLogin.html', type : 'POST', dataType: 'json', data: { 'CMD' : 'CHECK_PARENT', 'M_PARENT' : Value }, error: function(xhr, desc, exceptionobj){ alert(xhr.responseText); return false; }, success: function(json) { if ( json.result == 1 ) window.location.href='/Member/MemberJoin.html'; else alert( json.msg ); } }); } function MemberLogin() { var M_ID = $.trim($("#M_ID").val()); var M_PW = $.trim($("#M_PW").val()); if( M_ID == '' ) { alert('아이디를 입력하세요'); $("#M_ID").focus(); return false; } if( M_PW == '' ) { alert('비밀번호를 입력하세요'); $("#M_PW").focus(); return false; } $.ajax({ url : '/post/post_MemberLogin.html', type : 'POST', dataType: 'json', data: { 'CMD' : 'LOGIN', 'M_ID' : M_ID, 'M_PW' : M_PW }, error: function(xhr, desc, exceptionobj){ alert(xhr.responseText); return false; }, success: function(json) { if ( json.result == 1 ) window.location.href='/'; else alert( json.msg ); } }); }