0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 13.58.221.124


Current Path : /var/www/oasis/js_old/
Upload File :
Current File : /var/www/oasis/js_old/changeMobile.js

function CallEnableChangeMobile() {
  $("#page_main_div").load("../html_modules/changeMobile.html", function() {
    document.getElementById("display_module_name").innerHTML = "Change Mobile";
    document.getElementById("module_name_for_save").value = "Change Mobile";
    getDefaultHeadFooterLinks("Change Mobile");
  });
}

function getoldmobileno() {
  var oldmobileno = $("#oldmobileno").val();

  if ($("#oldmobileno").val() == "") {
    return;
  }
  if (oldmobileno.length < 10) {
    alert("Please Enter Mobile Number Correclty");
    setTimeout(function() {
      document.getElementById("oldmobileno").focus();
    }, 0);
    return;
  }

  $.blockUI({
    message:
      "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>"
  });

  var parameters = `&oldmobileno=${$("#oldmobileno").val()}`;
  $.ajax({
    type: "POST",
    data: parameters,
    url: $host_url + "getoldmobileno",
    success: getoldmobilenoResponce
  });
}

function getoldmobilenoResponce(responce) {
  responce = eval("(" + responce + ")");
  $.unblockUI();
  if (responce.error_code == "0") {
    $("#fname").val(responce.data.fname);
    $("#femail").val(responce.data.femail);
    $("#fmobileno").val(responce.data.fmobileno);

    document.getElementById("fmobileno").disabled = false;
    document.getElementById("femail").disabled = false;
    document.getElementById("fname").disabled = false;

    $("#fmobileno").focus();
    return;
  } else if (responce.error_code == "-1") {
    alert(responce.data);

    $("#fname").val("");
    $("#femail").val("");
    $("#fmobileno").val("");
    $("#oldmobileno").val("");

    document.getElementById("fmobileno").disabled = true;
    document.getElementById("femail").disabled = true;
    document.getElementById("fname").disabled = true;

    $("#oldmobileno").focus();
    return;
  }
}

function savestudentmobno() {
  $.blockUI({
    message:
      "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>"
  });
  var parameters = `&oldmobileno=${$("#oldmobileno").val()}
						&fname=${$("#fname").val()}
						&femail=${$("#femail").val()}
						&fmobileno=${$("#fmobileno").val()}`;
  $.ajax({
    type: "POST",
    data: parameters,
    url: $host_url + "savestudentmobno",
    success: savestudentmobnoResponce
  });
}

function savestudentmobnoResponce(responce) {
  responce = eval("(" + responce + ")");
  $.unblockUI();

  if (responce.error_code == "0") {
    alert(responce.data);

    $("#fname").val("");
    $("#femail").val("");
    $("#fmobileno").val("");
    $("#oldmobileno").val("");

    document.getElementById("fmobileno").disabled = true;
    document.getElementById("femail").disabled = true;
    document.getElementById("fname").disabled = true;

    $("#oldmobileno").focus();
    return;
  } else if (responce.error_code == "-1") {
    alert(responce.data);
    $("#fname").val("");
    $("#femail").val("");
    $("#fmobileno").val("");
    $("#oldmobileno").val("");

    document.getElementById("fmobileno").disabled = true;
    document.getElementById("femail").disabled = true;
    document.getElementById("fname").disabled = true;

    $("#oldmobileno").focus();
    return;
  }
}