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 : 3.147.82.108
Current Path : /var/www/html/bnu_old/js/ |
| Current File : /var/www/html/bnu_old/js/ack_adm_application.js |
var gdegree = '';
var gappfrom = '';
var gappto = '';
var gstatus = '';
/*
chnged address field updation
*/
function CallEnableAdmApplication()
{
$("#page_main_div").load('html_modules/ack_adm_application.html?v=22092018',function(){
document.getElementById('display_module_name').innerHTML = 'Acknowledge Admission Applications';
document.getElementById('module_name_for_save').value = 'Acknowledge Admission Applications';
getDefaultHeadFooterLinks('Acknowledge Admission Challan');
$(".ui-tabs .ui-tabs-panel").css("padding","0px");
$(".ui-tabs .ui-tabs-panel").css("padding-top","21px");
loadAdmDegree();
});
}
function loadAdmDegree()
{
$.ajax({
type: "POST",
async: false,
url: $host_url+"loaddegree",
success: loaddegreeResponseAdm
});
}
function loaddegreeResponseAdm($responceCat)
{
$responceCat = eval('(' + $responceCat + ')');
if($responceCat.error_code==0)
{
var optionsAsString = "<option value=''>--Select Degree--</option>";
for(var i = 0; i < $responceCat.data.length; i++)
{
optionsAsString += "<option value='" + $responceCat.data[i].internal_code + "'>" + $responceCat.data[i].internal_code +"-"+ $responceCat.data[i].value + "</option>";
}
$("#adm_degree" ).append( optionsAsString );
}
}
function DisplayAdmApplication()
{
var adm_degree = $("#adm_degree").val();
var appfrom = $("#appfrom").val();
var appto = $("#appto").val();
var status = $("#status").val();
if(empty(adm_degree))
{
alert("Please Select Degree");
$("#adm_degree").focus();
return false;
}
if(appfrom == '')
{
alert("Please Enter Application no. from");
$("#appfrom").focus();
return false;
}
if(appto == '')
{
alert("Please Enter Application no. to");
$("#appto").focus();
return false;
}
gdegree = adm_degree;
gappfrom = appfrom;
gappto = appto;
gstatus = status;
$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>" });
var parameters = `°ree=${$("#adm_degree").val()}
&app_from=${$("#appfrom").val()}
&app_to=${$("#appto").val()}
&status=${$("#status").val()}`;
$.ajax({
type: "POST",
data: parameters,
url: $host_url+"DisplayAdmApplication",
success:DisplayAdmApplicationResponce
});
}
function DisplayAdmApplicationResponce(responce)
{
responce = eval('(' + responce + ')');
$.unblockUI();
$("#adm_applications").html("");
$("#adm_applications").html(responce.data['html']);
}
function EditStudentDetails(id, degree)
{
$.ajax({
type: "POST",
//async:false,
url: $host_url+"getappnostudentdetails.demo",
data:"app_no="+id+"°ree="+degree,
success: EditStudentDetailsResponse
});
}
function EditStudentDetailsResponse($responce)
{
$responce = eval('(' + $responce + ')');
document.getElementById('is_add_edit').value = 'Edit';
if($responce.error_code == 0 || $responce.error_code == -1)
{
$("#page_main_div").load('html_modules/ack_adm_entry.html?v=22092018',function()
{
var option = '<option value="">--Select--</option>';
for (var j=2018;j>1980;j--)
{
option += "<option value='"+j+"'>"+j+"</option>";
}
$("#fyear").append(option);
var serv_arr = $responce.data['mascomb'];
var serv_title = '';
FillDropdownValues(serv_arr,'combination',serv_title);
var serv_arr = $responce.data['category'];
var serv_title = '';
FillDropdownValues(serv_arr,'degree_category',serv_title);
var serv_arr = $responce.data['degree'];
var serv_title = '';
FillDropdownValues(serv_arr,'student_entry_degree_code',serv_title);
var serv_arr = $responce.data['boards'];
var serv_title = '';
FillDropdownValues(serv_arr,'seUniversityName',serv_title);
var gender = $responce.data.perdetl['student_entry_gender'];
if(gender != "")
{
var $radios = $('input:radio[name=student_entry_gender]');
$radios.filter('[value='+gender+']').attr('checked', true);
}
$("#perdetl input[type=text],#perdet select").each(function(l)
{
$(this).val($responce.data.perdetl[$(this).attr('id')]);
});
$("#univdetl input[type=text],#univdetl select").each(function(l)
{
$(this).val($responce.data.perdetl[$(this).attr('id')]);
});
$("#subject_appearing").show();
$("#subject_appearing").html($responce.data.html);
$('#student_entry_degree_code').val($responce.data.perdetl['student_entry_degree_code']);
$('#combination').val($responce.data.perdetl['combination']);
$('#degree_category').val($responce.data.perdetl['degree_category']);
$('#student_entry_photo').attr('src',$responce.data.perdetl['student_entry_photo']);
$('#student_signature_photo').attr('src',$responce.data.perdetl['student_signature_photo']);
$('#student_entry_blood_grp').val($responce.data.perdetl['student_entry_blood_grp']);
$('#farea').val($responce.data.perdetl['farea']);
$('#student_entry_religion').val($responce.data.perdetl['student_entry_religion']);
let uploadtable = `<style type = "text/css">
.table-upd tbody tr td {
padding : 2px;
vertical-align:middle;
text-align: left;
}
.table-upd tbody upd-file {
display: inline !important;
}
.table-upd tbody input[type="file"] {
display: inline;
}
.table-upd tbody button {
padding : 7px;
margin: 15px;
}
.table-upd thead tr td {
text-align: center;
}
</style>
<table class='table table-bordered table-striped table-upd' id = "uploaddet">
<thead>
<tr class='ui-state-default ui-jqgrid-hdiv'>
<td style='padding:2px; width:30px;
border-left:1px solid #C5DBEC;
border-right:1px solid #C5DBEC;
border-bottom:1px solid #C5DBEC;'
>Sl. No.
</td>
<td style='padding:2px; width:265px;
border-right:1px solid #C5DBEC;
border-bottom:1px solid #C5DBEC;' >Description</td>
<td style='padding:2px; width:190px; border-right:1px solid #C5DBEC;
border-bottom:1px solid #C5DBEC;'>
Upload</td>
<td style='padding:2px; width:65px;
border-right:1px solid #C5DBEC;
border-bottom:1px solid #C5DBEC;'>
File</td>
<td style='padding:2px; width:65px;
border-right:1px solid #C5DBEC;
border-bottom:1px solid #C5DBEC;'>
Remove File</td>
</tr>
</thead>
<tbody>`;
var masdoc = $responce.data.masdoc;
console.log(masdoc);
let z = 1;
var alist = ''
$.each( masdoc, function( key, value )
{
alist = '';
if(value.file_path != '')
{
alist = `<a href = "${value.file_path}" target = '_blank'>${value.FFILENAME}</a>`;
}
uploadtable += `<tr class='ui-widget-content jqgrow'>
<td class='tbl_row_new' align='center'
style='border-left:1px solid #C5DBEC;
border-right:1px solid #C5DBEC; padding:2px;'>
${z}</td>
<td class='tbl_row_new' align='center' style='border-right:1px solid #C5DBEC; padding:2px;' id = "doc_upload_${value.int_code}">${value.doc_type}</td>
<td class='tbl_row_new' align='center' style='border-right:1px solid #C5DBEC; padding:2px;' >
<input type="file" name="${value.FFILENAME}"
id="${value.FFILENAME}" class = "upd-file"
style="width:100px;padding:5px 0px;" />
<input type = "hidden" id = "h_${value.FFILENAME}">
<span class="raval_submit" style="margin-top: 2px;width:50px;
float:right;margin-left:0px;cursor: pointer;color:#545345;
line-height: 25px;font-size:12px;font-weight:bold;"
onclick= 'DisplayUserSelectedfile("${value.FFILENAME}")'>Upload</span>
</td>
<td class='tbl_row_new' style='border-right:1px solid #C5DBEC; padding:2px;' id="attach_td_${value.FFILENAME}">${alist}</td>
<td class='tbl_row_new' align='center' style='border-right:1px solid #C5DBEC; padding:2px;' >
<span class="raval_submit" style="margin-top: 2px;width:50px;
float:right;margin-left:0px;cursor: pointer;color:#545345;
line-height: 25px;font-size:12px;font-weight:bold;"
onclick= 'removedocument("${value.FFILENAME}")'>Remove</span>
</td>
</tr>`;
z++;
});
$('#upddet').html(uploadtable);
$("#fee_combination_div").show();
$("#fee_combination_div").html('');
$("#fee_combination_div").html($responce.data.fee_html);
});
}
else if($responce.error_code == -2)
{
DeletedRecords = 0;
//$("#error_msg").html(" In Valid SL Number ");
alert('In Valid SL Number');
$("#student_entry_slno").val('');
document.getElementById('student_entry_slno').focus();
}
}
function DisplaystudentSignature()
{
var valid_file_extentions = new Array("jpeg","jpg");
var ext=$("#student_entry_signupload").val();
filepath=ext;
ext = ext.substring(ext.length-3,ext.length);
ext = ext.toLowerCase();
if(ext != "" && !in_array(ext,valid_file_extentions))
{
alert("Select valid photo!");
$("#student_entry_signupload").val('');
return false;
}
$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>" });
var lstr_data="&filepath="+filepath;
$upload = $host_url+"DiaplayStudentSignature&"+lstr_data;
document.getElementById("form_module_image_upload").setAttribute("action",$upload);
return AIM.submit(document.getElementById("form_module_image_upload"), 'report_display',{'onComplete' : DiaplayStudentSignatureResponse});
}
function DiaplayStudentSignatureResponse($responce)
{
$.unblockUI();
$responce = eval('(' + $responce + ')');
if($responce.error_code==0)
{
$("#student_signature_photo").attr("src", $responce.data);
$("#student_entry_signupload_hidden").val($responce.data);
}
else if($responce.error_code==-1)
$("#student_signature_photo").attr("src", "images/sign_logo.png");
else if($responce.error_code==-2)
{
alert($responce.data);
$("#student_signature_photo").attr("src", "images/sign_logo.png");
$("#student_entry_signupload").val("");
}
}
function DiaplayStudentPhoto()
{
var valid_file_extentions = new Array("jpeg","jpg");
var ext=$("#student_entry_upload").val();
filepath=ext;
ext = ext.substring(ext.length-3,ext.length);
ext = ext.toLowerCase();
if(ext != "" && !in_array(ext,valid_file_extentions))
{
alert("Select valid photo!");
$("#student_entry_upload").val('');
return false;
}
$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>" });
var lstr_data="&filepath="+filepath;
$upload = $host_url+"DiaplayStudentPhoto&"+lstr_data;
document.getElementById("form_module_image_upload").setAttribute("action",$upload);
return AIM.submit(document.getElementById("form_module_image_upload"), 'report_display',{'onComplete' : DiaplayStudentPhotoResponse});
}
function DiaplayStudentPhotoResponse($responce)
{
$.unblockUI();
$responce = eval('(' + $responce + ')');
if($responce.error_code==0)
{
$("#student_entry_photo").attr("src", $responce.data);
$("#student_entry_photo_hidden").val($responce.data);
}
else if($responce.error_code==-1)
$("#student_entry_photo").attr("src", "images/default_photo.png");
else if($responce.error_code==-2)
{
alert($responce.data);
$("#student_entry_photo").attr("src", "images/default_photo.png");
$("#student_entry_photo").val("");
}
}
function DisplayUserSelectedfile(file_name)
{
var valid_file_extentions = new Array("jpeg","jpg","pdf");
var ext=$("#"+file_name).val();
filepath=ext;
ext = ext.substring(ext.length-3,ext.length);
ext = ext.toLowerCase();
if(ext != "" && !in_array(ext,valid_file_extentions))
{
alert("Select valid photo!");
$("#"+file_name).val('');
return false;
}
$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>" });
var lstr_data="&filepath="+filepath+"&file_name="+file_name;
$upload = $host_url+"DisplayUserSelectedfile&"+lstr_data;
document.getElementById("form_module_image_upload").setAttribute("action",$upload);
return AIM.submit(document.getElementById("form_module_image_upload"), 'report_display',{'onComplete' : DisplayUserSelectedfileResponse});
}
function DisplayUserSelectedfileResponse($responce)
{
$.unblockUI();
$responce = eval('(' + $responce + ')');
if($responce.error_code==0)
{
console.log($responce.data.path);
console.log($responce.data.file_name);
$('#h_'+$responce.data.file_name).val($responce.data.path);
var str = `<a href = "${$responce.data.path}" target = "_blank">${$responce.data.file_name}</a>`;
document.getElementById('attach_td_'+$responce.data.file_name).innerHTML = str;
console.log($('#h_'+$responce.data.file_name).val());
}
else if($responce.error_code==-2)
{
alert($responce.data);
return;
}
}
function Upload(file_file)
{
var file_name = $("#"+file_file).val();
if(file_name == '')
{
alert('Please Select File.');
return;
}
var file_size = $("#"+file_file)[0].files[0].size;
var file_extn = file_name.split('.').pop();
var file_extn = file_extn.toLowerCase();
if(file_extn=="jpeg" || file_extn=="jpg" || file_extn=="pdf")
{
}
else
{
alert("JPEG, JPG, PDF files are allowed!");
return false;
}
if(file_size >= 10000000)
{
alert('Upload files with size less then 2MB!');
return false;
}
var file_data = $("#"+file_file).prop('files')[0];
var form_data = new FormData();
form_data.append('file', file_data);
$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='../images/ajax-loader.gif' border='0'></h1>" });
$.ajax({
type: "POST",
url: "upload_file.php",
data: form_data,
cache: false,
contentType: false,
processData: false,
success: function(data)
{
$.unblockUI();
$('#h_'+file_file).val(data);
var str = `<a href = "${data}" target = "_blank">${file_file}</a>`;
document.getElementById('attach_td_'+file_file).innerHTML = str;
},
error: function(data)
{
alert(data);
}
});
}
function Uploadphotosignature(file_file)
{
var file_name = $("#"+file_file).val();
if(file_name == '')
{
alert('Please Select File.');
return;
}
var file_size = $("#"+file_file)[0].files[0].size;
var file_extn = file_name.split('.').pop();
var file_extn = file_extn.toLowerCase();
if(file_extn=="jpeg" || file_extn=="jpg" || file_extn=="pdf")
{
}
else
{
alert("JPEG, JPG, PDF files are allowed!");
return false;
}
if(file_size >= 10000000)
{
alert('Upload files with size less then 2MB!');
return false;
}
var file_data = $("#"+file_file).prop('files')[0];
var form_data = new FormData();
form_data.append('file', file_data);
//$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='../images/ajax-loader.gif' border='0'></h1>" });
$.ajax({
type: "POST",
url: "upload_file.php",
data: form_data,
cache: false,
contentType: false,
processData: false,
success: function(data)
{
//$.unblockUI();
//$('#h_'+file_file).val(data);
//var str = `<a href = "${data}" target = "_blank">${file_file}</a>`;
//document.getElementById('attach_td_'+file_file).innerHTML = str;
},
error: function(data)
{
alert(data);
}
});
}
function FillDropdownValues(arr,ele_name,def_title)
{
document.getElementById(ele_name).options.length=0;
var option = "<option value=''>--Select--</option>";
for (let value of arr) {
option += "<option value='"+value.int_code+"'>"+value.val+"</option>";
}
$("#"+ele_name).append(option);
}
function CalculateSETotalFee()
{
var student_entry_reg_fee=parseFloat(empty($("#student_entry_reg_fee").val())?0.0:$("#student_entry_reg_fee").val());
var student_entry_exam_fee=parseFloat(empty($("#student_entry_exam_fee").val())?0.0:$("#student_entry_exam_fee").val());
var student_entry_grade_card_fee=parseFloat(empty($("#student_entry_grade_card_fee").val())?0.0:$("#student_entry_grade_card_fee").val());
var total_fee=parseFloat(student_entry_reg_fee+student_entry_exam_fee+student_entry_grade_card_fee);
$("#student_entry_total_fee").val(total_fee);
}
function getLateralEntrySubjects()
{
if(document.getElementById("is_lateral_entry").checked==true)
{
$("#student_entry_exam").val("C") ;
getsubjectAppearingTotal();
}
else
{
$("#student_entry_exam").val("A") ;
getsubjectAppearingTotal();
}
}
function GetCombinationFeeListResponse($responce)
{
$responce = eval('(' + $responce + ')');
$("#fee_combination_div").html("");
$("#tbl_menu").show();
$("#fee_total_div").show();
$("#fee_combination_div").html($responce.data.html);
CalculateTotalFeePaid();
}
function CalculateTotalFeePaid()
{
var obj=$("input[id*='fee_paying_']");
var tot_paid=0;
jQuery.each(obj, function(k, v) {
tot_paid=tot_paid+parseFloat($("#"+v['id']).val());
});
$("#fee_paid").val(tot_paid);
$("#total_fee_paid").html(tot_paid);
}
function multifileUpload(degree)
{
var lstr_query_string="degree="+degree;
$.ajax({
type: "POST",
url:$host_url+'GetCMSAmountValue',
data: lstr_query_string,
success: function GetCMSAmountValueResponce(responce)
{
try
{
responce = eval('(' + responce + ')');
$("#sedocs_div").html(responce.data['doc_arr']);
$("#exam_table tbody input").inputmask({
"mask": "9",
"repeat": 3,
"greedy": false
});
}
catch(err)
{
txt= err.message;
$.unblockUI();
}
}
});
}
var avgTotalPer = 0;
function calcuPercent(index)
{
var secrmarks = $("#marks_sec"+index).val();
var maxmarks = $("#marks_total"+index).val();
if(parseInt(maxmarks) < parseInt(secrmarks))
{
alert('Maximum marks should be greater than Secured marks');
$("#wghtAvgPer").val('');
$("#marks_per"+index).val('');
$("#marks_total"+index).val('');
$("#marks_total"+index).focus();
return false;
}
if(secrmarks !='' && maxmarks !='')
{
var pertage = (parseInt(secrmarks) / parseInt(maxmarks)) * 100;
pertage = pertage.toFixed(2);
$("#marks_per"+index).val(pertage);
}
var yscnt = $("#nosemYear").val();
var secureTotal = 0;
var maxTotal = 0;
for(var j=1;j<=yscnt;j++)
{
var secureVal= 0;
var secure=$("#marks_sec"+j).val();
if(secure !='')
{
secureVal=parseInt($("#marks_sec"+j).val());
}
secureTotal += secureVal;
$("#marks_secTot").val(secureTotal);
var maxMarks=$("#marks_total"+j).val();
var maxVMarksVal = 0;
if(maxMarks !='')
{
maxVMarksVal=parseInt($("#marks_total"+j).val());
}
maxTotal += maxVMarksVal;
$("#marks_subtotal").val(maxTotal);
}
if(maxTotal != 0 && secureTotal != 0)
{
var totalpertage = (parseInt(secureTotal) / parseInt(maxTotal)) * 100;
totalpertage = totalpertage.toFixed(2);
avgTotalPer = totalpertage;
//$("#seWeightedAverage").html(totalpertage);
$("#marks_Avgper").val(totalpertage);
}
}
function acceptNumbersOnlyForModule(ev)
{
var keyCode = window.event ? ev.keyCode : ev.which;
//codes for 0-9
if (keyCode < 48 || keyCode > 57) {
//codes for backspace, delete, enter
if (keyCode != 0 && keyCode != 8 && keyCode != 13 && !ev.ctrlKey) {
ev.preventDefault();
}
}
}
function SelectBoardCode()
{
var id=jQuery("#table_grid3").getGridParam('selrow');
if( id!=null )
{
$.ajax({
type: "POST",
async:false,
url: $host_url+"getBoardNames.demo",
data: "board_id="+id,
success: PopulateBoardResponse
});
$('#dialog').dialog("close");
}
else
{
alert("Please select row");
}
return;
}
var gtype = '';
function getBoardNames(type)
{
var id = null;
gtype = type;
if(type == '10')
{
id = $('#seUniversityid10').val();
}
else if(type == 'puc')
{
id = $('#seUniversityid').val();
}
if( id!=null )
{
$.ajax({
type: "POST",
async:false,
url: $host_url+"getBoardNames.demo",
data: "board_id="+id,
success: PopulateBoardResponse
});
}
else
{
alert("Please select row");
}
return;
}
function GetCombinationFeeList()
{
var fdegree =$("#student_entry_degree_code").val();
if(empty(fdegree))
{
alert("Please Select Degree");
$("#student_entry_degree_code").focus();
return false;
}
var fexamno ="A";
var fcatcode =$("#degree_category").val();
var fcombcode =$("#degree_combination").val();
var lstr_str="&fdegree="+fdegree;
lstr_str+="&fexamno="+fexamno;
lstr_str+="&fcombcode="+fcombcode;
lstr_str+="&fcatcode="+fcatcode;
lstr_str+="&fsl_no="+$("#student_entry_slno").val();
$.ajax({
type: "POST",
async:false,
url: $host_url+"GetCombinationFeeList",
data:lstr_str,
success: GetCombinationFeeListResponse
});
}
function GetCombinationFeeListResponse($responce)
{
$responce = eval('(' + $responce + ')');
$("#fee_combination_div").html("");
$("#fee_combination_div").html($responce.data.html);
CalculateTotalFeePaid();
}
function loaddegree()
{
$.ajax({
type: "POST",
async:false,
url: $host_url+"loaddegree",
success: loaddegreeResponse
});
}
function loaddegreeResponse($responceCat)
{
$responceCat = eval('(' + $responceCat + ')');
if($responceCat.error_code==0)
{
var optionsAsString = "<option value=''> Select Degree </option>";
for(var i = 0; i < $responceCat.data.length; i++)
{
optionsAsString += "<option value='" + $responceCat.data[i].internal_code + "'>" + $responceCat.data[i].value + "</option>";
}
$("#student_entry_degree_code" ).append( optionsAsString );
}
}
function onlyAlphabets(e, t)
{
try
{
if (window.event)
{
var charCode = window.event.keyCode;
}
else if (e)
{
var charCode = e.which;
}
else
{
return true;
}
if ((charCode > 64 && charCode < 91) || (charCode > 96 && charCode < 123) || charCode == 32)
return true;
else
return false;
}
catch (err)
{
alert(err.Description);
}
}
function applicationdisplay()
{
$("#page_main_div").load('html_modules/ack_adm_application.html',function(){
document.getElementById('display_module_name').innerHTML = 'Acknowledge Admission Applications';
document.getElementById('module_name_for_save').value = 'Acknowledge Admission Applications';
getDefaultHeadFooterLinks('Acknowledge Admission Challan');
$(".ui-tabs .ui-tabs-panel").css("padding","0px");
$(".ui-tabs .ui-tabs-panel").css("padding-top","21px");
loadAdmDegree();
$('#adm_degree').val(gdegree);
$('#appfrom').val(gappfrom);
$('#appto').val(gappto);
$('#status').val(gstatus);
DisplayAdmApplication();
});
}
function savestudentapplication()
{
jsonObj = [];
gRgPerinfo = '';
subdet = [];
if($('#fee_paying_1').val() == '0')
{
alert('Please Enter Amount');
$('#fee_paying_1').focus();
return;
}
if($('#constype').val() == '')
{
alert('Please select concession fee applicable');
$('#constype').focus();
return;
}
$("#uploaddet input[type=hidden]").each(function()
{
var item = {};
item ["id"] = $(this).attr('id');
item ["value"] = $(this).val();
jsonObj.push(item);
});
$("#perdetl input[type=text],#perdetl select").each(function()
{
item = {};
item ["id"] = $(this).attr('id');
item ["value"] = $(this).val();
jsonObj.push(item);
});
$("#univdetl input[type=text],#univdetl select").each(function()
{
item = {};
item ["id"] = $(this).attr('id');
item ["value"] = $(this).val();
jsonObj.push(item);
});
perinfo = encodeURI(JSON.stringify(jsonObj));
$("#subject_appearing .subcode input[type=text]").each(function()
{
item = {};
item ["id"] = $(this).attr('id');
item ["value"] = $(this).val();
subdet.push(item);
});
gRgPerinfo = encodeURI(JSON.stringify(jsonObj));
subdet = JSON.stringify(subdet);
var fappno = $('#fappno').val();
var gender = $("input[name='student_entry_gender']:checked").val();
var student_photo = $('#student_entry_photo_hidden').val();
var student_sign = $('#student_entry_signupload_hidden').val();
var datastring = 'personal_info='+gRgPerinfo+"&pRgSubjects="+subdet+"&fappno="+fappno+"&student_sign="+student_sign+"&student_photo="+student_photo+"&gender="+gender;
$.ajax({
type: "POST",
data:datastring,
url:$host_url+'savestudentapplication',
success: function(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code === -1)
{
alert('Updation Failed');
return;
}
else
{
alert('Updated successfuly');
applicationdisplay();
return;
}
}
});
}
function getcombinationsubjectdet()
{
$.ajax({
type: "POST",
//async:false,
url: $host_url+"getcombinationsubjectdet",
data:"degree_code="+$("#student_entry_degree_code").val()+"&combination="+$("#combination").val(),
success: getcombinationsubjectdetlResponse
});
}
function getcombinationsubjectdetlResponse(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code === -1)
{
}
else
{
$("#subject_appearing").show();
$("#subject_appearing").html(responce.data.html);
}
}
function removedocument(filename)
{
$.ajax({
type: "POST",
//async:false,
url: $host_url+"removedocument",
data:"degree_code="+$("#student_entry_degree_code").val()+"&fappno="+$("#student_entry_admno").val()+"&filename="+filename,
success: removedocumentResponse
});
}
function removedocumentResponse(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code === -1)
{
alert(responce.data);
return;
}
else
{
alert(responce.data.msg);
$("#attach_td_"+responce.data.filename).empty();
}
}
function printapplication(appno,degree)
{
var parameters = "&app_no="+appno;
window.location.href = $host_url+"printApplication.demo"+parameters;
}
function RemoveApplication(appno,degree)
{
$.ajax({
type: "POST",
//async:false,
url: $host_url+"RemoveApplication",
data:"appno="+appno+"°ree="+degree,
success: RemoveApplicationResponse
});
}
function RemoveApplicationResponse(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code === -1)
{
alert(responce.data);
return;
}
else
{
alert(responce.data.msg);
DisplayAdmApplication();
return;
}
}
|