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 : 18.117.254.202


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

// $geditinternalcode=1;CallEnableTeacherEntry("Edit");

var totallength = "";

function EnableMessageText() {
  $("#page_main_div").load("../html_modules/message_text.html", function() {
    document.getElementById("display_module_name").innerHTML = "Message Text";
    document.getElementById("module_name_for_save").value = "Message Text";
    getDefaultHeadFooterLinks("Message Text");
    $("#mess_details").hide();
  });
}

function display() {
  $("#mess_details").show();
}

function SaveMessageTxet() {
  var messagetext = document.getElementById("messagetext").value;
  var fmodule = document.getElementById("fmodule").value;
  var fdate = document.getElementById("fdate").value;
  var tdate = document.getElementById("tdate").value;

  var datastring =
    "&messagetext=" +
    messagetext +
    "&fmodule=" +
    fmodule +
    "&fdate=" +
    fdate +
    "&tdate=" +
    tdate;
  alert(datastring);
  $.ajax({
    type: "POST",
    url: $host_url + "SaveMessageTxet",
    data: datastring,
    success: SaveMessageTxetresponse
  });
}

function SaveMessageTxetresponse(responce) {
  responce = eval("(" + responce + ")");
  alert(responce.data);
}

function validateDate(ldate) {
  var pattern = /^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/;
  if (ldate == null || ldate == "" || !pattern.test(ldate)) {
    errMessage = "Invalid date\n";
    alert(errMessage);
    return errMessage;
  } else {
    return 999;
  }
}