Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(function(){
- $('input:radio[name="master"]').change(function(){
- var master = $('input:radio[name="master"]:checked').val();
- if(master == "#desavir_Полина")
- $('input:radio[name="Polina_date"]').change(function(){
- var Polina_date = $('input:radio[name="Polina_date"]:checked').val();
- $.ajax({
- type: "POST",
- url: 'php/array_master_time.php',
- data: {
- "master": master, "Polina_date": Polina_date
- },
- success: function(response)
- {
- $("#Polina_time").html(response);
- },
- error: function(jqXHR, exception)
- {
- if (jqXHR.status === 0) {
- alert('НЕ подключен к интернету!');
- } else if (jqXHR.status == 404) {
- alert('НЕ найдена страница запроса [404])');
- } else if (jqXHR.status == 500) {
- alert('НЕ найден домен в запросе [500].');
- } else if (exception === 'parsererror') {
- alert("Ошибка в коде: \n"+jqXHR.responseText);
- } else if (exception === 'timeout') {
- alert('Не ответил на запрос.');
- } else if (exception === 'abort') {
- alert('Прерван запрос Ajax.');
- } else {
- alert('Неизвестная ошибка:\n' + jqXHR.responseText);
- }
- }
- });
- });
- else if(master == "#desavir_Света")
- $('input:radio[name="Sveta1_date"]').change(function(){
- var Sveta1_date = $('input:radio[name="Sveta1_date"]:checked').val();
- $.ajax({
- type: "POST",
- url: '/php/array_master_time.php',
- data: { // что отправляем
- "master": master, "Sveta1_date": Sveta1_date
- },
- success: function(response)
- {
- alert(781);
- },
- error: function(jqXHR, exception)
- {
- if (jqXHR.status === 0) {
- alert('НЕ подключен к интернету!');
- } else if (jqXHR.status == 404) {
- alert('НЕ найдена страница запроса [404])');
- } else if (jqXHR.status == 500) {
- alert('НЕ найден домен в запросе [500].');
- } else if (exception === 'parsererror') {
- alert("Ошибка в коде: \n"+jqXHR.responseText);
- } else if (exception === 'timeout') {
- alert('Не ответил на запрос.');
- } else if (exception === 'abort') {
- alert('Прерван запрос Ajax.');
- } else {
- alert('Неизвестная ошибка:\n' + jqXHR.responseText);
- }
- }
- });
- });
- else
- $('input:radio[name="Sveta2_date"]').change(function(){
- var Sveta2_date = $('input:radio[name="Sveta2_date"]:checked').val();
- $.ajax({
- type: "POST",
- url: '/php/array_master_time.php',
- data: { // что отправляем
- "master": master, "Sveta2_date": Sveta2_date
- },
- success: function(response)
- {
- alert(782);
- },
- error: function(jqXHR, exception)
- {
- if (jqXHR.status === 0) {
- alert('НЕ подключен к интернету!');
- } else if (jqXHR.status == 404) {
- alert('НЕ найдена страница запроса [404])');
- } else if (jqXHR.status == 500) {
- alert('НЕ найден домен в запросе [500].');
- } else if (exception === 'parsererror') {
- alert("Ошибка в коде: \n"+jqXHR.responseText);
- } else if (exception === 'timeout') {
- alert('Не ответил на запрос.');
- } else if (exception === 'abort') {
- alert('Прерван запрос Ajax.');
- } else {
- alert('Неизвестная ошибка:\n' + jqXHR.responseText);
- }
- }
- });
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement