//フォーム切り替え $(function() { $('input[type=radio]').change(function() { $('div.mem').hide(); $('div.new').hide(); if ($("input:radio[name='custmer']:checked").val() == "1") { $('div.mem').show(); } else if($("input:radio[name='custmer']:checked").val() == "2") { $('div.new').show(); } }).trigger('change'); //←(1) }); jQuery(document).ready(function(){ jQuery("#MemberForm").validationEngine( 'attach', { ajaxFormValidation: true ,onBeforeAjaxFormValidation: beforeCall, promptPosition: "bottomLeft", // エラーメッセージの表示位置 focusFirstField: false, // エラー時に一番最初の入力フィールドにフォーカスさせるかどうか。デフォルトはtrue scroll: false, // エラー時に一番最初の入力フィールドまでスクロールさせるかどうか。デフォルトはtrue }); function beforeCall(){ reservedId = $('#MemberForm').find('#reservedId').val(); seq = $('#MemberForm').find('#seq').val(); if((seq != "")&&(reservedId != "")){ $('.mem p').html('
Now Loading...
'); $('div.radio-group').hide(); $('form#MemberForm').hide(); $.ajax({ url: "/wp/wp-content/themes/new_aun/lib/js/cancelchk.php", type: "POST", data: {seq:seq,reservedId:reservedId}, dataType: "html", success: function(data) { if(data == 'error'){ $('div.radio-group').show(); $('.mem p.coution').html('予約番号か会員番号をご確認の上、
もう一度ご入力ください。'); $('form#MemberForm').show(); }else{ $('div.c-form').hide(); $('#DSchedule').html(jQuery.parseHTML(data)); } }, error: function(MLHttpRequest, textStatus, errorThrown) { $('div.radio-group').show(); $('.mem p.coution').html(errorThrown); $('form#MemberForm').show(); } }); } } }); jQuery(document).ready(function(){ jQuery("#FirstForm").validationEngine( 'attach', { ajaxFormValidation: true ,onBeforeAjaxFormValidation: beforeCall, promptPosition: "bottomLeft", focusFirstField: false, scroll: false, }); function beforeCall(){ reservedId = $('#FirstForm').find('#reservedId').val(); seq = $('#FirstForm').find('#seq').val(); if((seq != "")&&(reservedId != "")){ $('.new p').html('
Now Loading...
'); $('div.radio-group').hide(); $('form#FirstForm').hide(); $.ajax({ url: "/wp/wp-content/themes/new_aun/lib/js/cancelchk.php", type: "POST", data: {seq:seq,reservedId:reservedId}, dataType: "html", success: function(data) { if(data == 'error'){ $('div.radio-group').show(); $('.new p.coution').html('予約番号か申込番号をご確認の上、
もう一度ご入力ください。'); $('form#FirstForm').show(); }else{ $('div.c-form').hide(); $('#DSchedule').html(jQuery.parseHTML(data)); } }, error: function(MLHttpRequest, textStatus, errorThrown) { $('div.radio-group').show(); $('.mem p.coution').html(errorThrown); $('form#FirstForm').show(); } }); } } }); jQuery(document).ready(function(){ jQuery("#DSchedule").validationEngine( 'attach', { ajaxFormValidation: true ,onBeforeAjaxFormValidation: beforeCall, promptPosition: "bottomLeft", focusFirstField: false, scroll: false, }); function beforeCall(){ reservedId = $('#DSchedule').find('#reservedId').val(); seq = $('#DSchedule').find('#seq').val(); pass = $('#DSchedule').find('#pass').val(); if((seq != "")&&(reservedId != "")&&(pass != "")){ $('div.c-form').show(); $('p.coution').html('
Now Loading...
'); $('p.coution').show; $('form#DSchedule').hide(); $.ajax({ url: "/wp/wp-content/themes/new_aun/lib/js/cancelcmp.php", type: "POST", data: {seq:seq,reservedId:reservedId,pass:pass}, dataType: "html", success: function(data) { if(data == 'error'){ $('p.coution').html('入力内容が違うようです。
ご確認の上、もう一度ご入力ください。'); $('form#DSchedule').show(); }else{ $('div.c-form').hide(); $('#DSchedule').html(jQuery.parseHTML(data)); $('form#DSchedule').show(); } }, error: function(MLHttpRequest, textStatus, errorThrown) { $('form#DSchedule').show(); } }); } } });