function enableTeachTransfer() { // console.log("hi"); $("#page_main_div").load( "../html_modules/receive_teach_trans.html", function () { document.getElementById("display_module_name").innerHTML = "Complete College Transfer"; document.getElementById("module_name_for_save").value = "Complete College Transfer"; getDefaultHeadFooterLinks("Complete College Transfer"); // loadPage(); loadTable(); } ); } function loadTable() { $.ajax({ type: "GET", url: $host_url + "loadteachtable", success: function (response) { var encode = JSON.parse(response); var table = ``; if (encode.error_code == 0) { for (var i = 0; i < encode.data.length; i++) { // console.log(encode.data[i].fstatus); // return; table += ``; table += ``; } table += `
Receive Teacher Transfer
App.
No.
Teacher Code Teacher Name From Colcode To
Colcode
Status Action
${ encode.data[i].fid } ${ encode.data[i].fteachcode } ${ encode.data[i].fteachname } ${ encode.data[i].ffromcolcode + " - " + encode.data[i].ffromcollname } ${ encode.data[i].ftocolcode + " - " + encode.data[i].ftocollname } Update
`; $("#tdata").html(table); } else { alert(encode.data.msg); } }, }); } function updateHandler(teachcode) { var status = document.getElementById("status").value; if (document.getElementById("status").value == "") { alert("please selec status.."); return false; } $.ajax({ type: "POST", data: "&fstatus=" + status + "&fteachcode=" + teachcode, url: $host_url + "updateHandler", success: function (response) { var encode = JSON.parse(response); if (encode.error_code == 0) { alert(encode.data.msg); } else { alert(encode.data.msg); } }, }); }