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


Current Path : /var/www/html/sdu/js/
Upload File :
Current File : /var/www/html/sdu/js/feeupdation.js

var totallength = ''

function CallEnablefeeInformation()
{
    $("#page_main_div").load('html_modules/feeupdation.html',function()
	{

		document.getElementById('display_module_name').innerHTML = 'Update Fee Information';
		document.getElementById('module_name_for_save').value = 'Update Fee Information';
		getDefaultHeadFooterLinks('Upadte Fee Information'); 
		$('#fee_details').hide();
	}); 
		
}
 
function getpopup()
{
	$.ajax({
		type: "POST",
		url: $host_url+"getfeeInformation",
		success: PopulateExamTypeListCategoryResponce
	});
}
 
function PopulateExamTypeListCategoryResponce(responce)
{
	responce = eval('(' + responce + ')');
	document.getElementById("candidate_list_category").options.length = 0;
	document.getElementById("FCONSTYPE").options.length = 0;
	document.getElementById("candidate_list_examno").options.length = 0;
	document.getElementById("candidate_list_degree").options.length = 0;
	
	var category =responce.data['category'];	
	var FCONSTYPE =responce.data['FCONSTYPE'];
	var FEXAMNO =responce.data['FEXAMNO'];
	var FDEGREE =responce.data['FDEGREE'];
	
	$op = new Option();
	$op.id=0;//specifying the id  for options
	//document.getElementById("candidate_list_category").options.add($op);
	
	for($i=0;$i < category.length;$i++)                                  
	{            
		$op = new Option(category[$i]['value'], category[$i]['internal_code']);
		$op.id=category[$i]['internal_code'];//specifying the id  for options
		document.getElementById("candidate_list_category").options.add($op);
	}
	
	for($i=0;$i < FCONSTYPE.length;$i++)                                  
	{   	   
		$op = new Option(FCONSTYPE[$i]['value'], FCONSTYPE[$i]['internal_code']);
		$op.id=FCONSTYPE[$i]['internal_code'];//specifying the id  for options
		document.getElementById("FCONSTYPE").options.add($op);
	}
	
	for($i=0;$i < FEXAMNO.length;$i++)                                  
	{   	   
		$op = new Option(FEXAMNO[$i]['value'], FEXAMNO[$i]['internal_code']);
		$op.id=FEXAMNO[$i]['internal_code'];//specifying the id  for options
		document.getElementById("candidate_list_examno").options.add($op);
	}
	
	for($i=0;$i < FDEGREE.length;$i++)                                  
	{   	   
		$op = new Option(FDEGREE[$i]['value'], FDEGREE[$i]['internal_code']);
		$op.id=FDEGREE[$i]['internal_code'];//specifying the id  for options
		document.getElementById("candidate_list_degree").options.add($op);
	}
	
}
 
function displayfeeDetails()
{
	var feetype = document.getElementById("FCONSTYPE").value;
	var examno = document.getElementById("candidate_list_examno").value;
	var degree = document.getElementById("candidate_list_degree").value;
	var category = document.getElementById("candidate_list_category").value;
	
	var datastring = "&feetype="+feetype+"&examno="+examno+"&degree="+degree+"&category="+category;
	$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>" });
		$.ajax({
		type: "POST",
		url: $host_url+"displayfeeDetails",
		data:datastring,
		success:saveCategoryMasterSuccess
	}); 
	
}
 
function saveCategoryMasterSuccess(responce)
{
	$('#fee_details').show();
	responce = eval('(' + responce + ')'); 
	$.unblockUI();
	$("#fee_details").load('html_modules/feedetail.html',function()
	{
		totallength = responce.data.totallength;
		$('#fee_indet_table').append(responce.data.details);
	});
	 
}
 
function savefeeInformation()
{
	var feetype = document.getElementById("FCONSTYPE").value;
	var examno = document.getElementById("candidate_list_examno").value;
	var degree = document.getElementById("candidate_list_degree").value;
	var category = document.getElementById("candidate_list_category").value;
	var fmodule = document.getElementById("fmodule").value;

	var chkCnt = 0;
	var j =0;
	var fheadcode = new Array();
	var ffee = new Array();
	var ffeepr = new Array();
	var ffeemax = new Array();
	var ffeere = new Array();
	var ffeerepr = new Array();
	var fromdate = new Array();
	var todate = new Array();
	var inputFileds = document.getElementsByTagName('input');

	for (var counter=0; counter < inputFileds.length; counter++) 
	{       
		if(inputFileds[counter].type.toUpperCase()=='TEXT'  && inputFileds[counter].name == "rowid"  )
		{   
			fheadcode[j]=encodeURIComponent($("#head"+chkCnt).val());
			ffee[j]=encodeURIComponent($("#fee"+chkCnt).val());
			ffeepr[j]=encodeURIComponent($("#feepr"+chkCnt).val());
			ffeemax[j]=encodeURIComponent($("#feemax"+chkCnt).val());
			ffeere[j]=encodeURIComponent($("#feere"+chkCnt).val());
			ffeerepr[j]=encodeURIComponent($("#feerepr"+chkCnt).val());
			fromdate[j]=encodeURIComponent($("#fromdate"+chkCnt).val());
			todate[j]=encodeURIComponent($("#todate"+chkCnt).val());
			chkCnt++;
			j++;
					
		}
	}

	//$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>" });
	var datastring = "&fheadcode="+fheadcode+"&ffee="+ffee+"&ffeepr="+ffeepr+"&ffeemax="+ffeemax+"&ffeere="+ffeere+"&ffeerepr="+ffeerepr+"&feetype="+feetype+"&examno="+examno+"&degree="+degree+"&category="+category+"&totallength="+totallength+"&fmodule="+fmodule+"&fromdate="+fromdate+"&todate="+todate;

	$.ajax({
	type: "POST",
	url: $host_url+"savefeeInformation",
	data:datastring,
	success:savefeeInformationresponse
	});  


}
 
function savefeeInformationresponse(responce)
{
 responce = eval('(' + responce + ')'); 
 alert(responce.data);
 displayfeeDetails();
 
}

function to_upperx(id)
{	
	var x = document.getElementById(id).value;
	document.getElementById(id).value = x.toUpperCase();
}