/* * onload */ $(function(){ init_login_form(); init_password_reminder_form(); init_nickname_change_form(); init_buttons(); }); /* * init_buttons * */ function init_buttons(){ init_login_button(); } /* * init_login_buttons * */ function init_login_button(){ $("a.navLogin").click(function(){ $('#boxPopupL').dialog('open'); }); // Password remainder $("a.navPassword").click(function(){ $('#boxPopupL3').dialog('open'); }); // nickname_change $("a#nicknamechange").click(function(){ $('#boxPopupL4').dialog('open'); }); $("a.btnLogin").click(function(){ //$('#boxPopupL').dialog('close'); $('form#logingo').submit(); }); // nickname change $("a.btnChange2").click(function(){ send = { nickname : $('input#anicknamechange').val() }; $.ajax({ type : "get", url : "https://maqs-inc.com/jp/account/ajax/edit_nickname.php?srv=32", data : send, dataType: "jsonp", cache : false, async : false, timeout : 3000, error : function(XMLHttpRequestObj, textStatus, errorThrow){ alert("<92>E<90>M<83>G<83><89><81>[<82>a<94>-<90>¶<82>μ<82>U<82>μ<82>?"); alert(send); }, success : function(data,dataType){ if (data == 0) { alert("変更されました。"); } else { msg = ""; $.each(data, function (k,v){ msg += "" + v + "\r\n"; }); alert(msg); } } }); // set nickname to session newnickname0 = $('input#anicknamechange').val(); var post_data = { newnickname : newnickname0 } target_url = "/jp/exec/login/set_nickname.php"; $.ajax({ url: target_url, type: 'POST', dataType: 'text', data : post_data, //dataType: 'json', async: false, timeout: 6000, error: function(){ //alert(parent_id ); //alert('Error occurred: get_category_list().' ); }, success: function(json){ rtn = json; } }); $('a#nicknamechange').text($('input#anicknamechange').val()) ; $('#boxPopupL4').dialog('close'); }); // Password remainder $("a.btnSendL").click(function(){ send = { email : $('input#send_to_address').val() }; $.ajax({ type : "get", url : "https://maqs-inc.com/jp/account/ajax/password.php?srv=32", data : send, dataType: "jsonp", cache : false, async : false, timeout : 3000, error : function(XMLHttpRequestObj, textStatus, errorThrow){ alert("<92>E<90>M<83>G<83><89><81>[<82>a<94>-<90>¶<82>μ<82>U<82>μ<82>?"); alert(send); }, success : function(data,dataType){ if (data == 0) { alert("メールが配信されましたので、ご確認ください。"); } else { msg = ""; $.each(data, function (k,v){ msg += "" + v + "\r\n"; }); alert(msg); } } }); $('#boxPopupL3').dialog('close'); }); } /* * * */ function init_login_form() { $('#boxPopupL').dialog({ autoOpen: false, resizable: false, width: 650, height: 350, modal: true, overlay: { backgroundColor: '#999', opacity: '0.5' } }); } /* * * */ function init_password_reminder_form() { $('#boxPopupL3').dialog({ autoOpen: false, resizable: false, width: 650, height: 350, modal: true, overlay: { backgroundColor: '#999', opacity: '0.5' } }); } /* * * */ function init_nickname_change_form() { $('#boxPopupL4').dialog({ autoOpen: false, resizable: false, width: 650, height: 350, modal: true, overlay: { backgroundColor: '#999', opacity: '0.5' } }); }