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.142.55.138


Current Path : /var/www/html/jssu/js/
Upload File :
Current File : //var/www/html/jssu/js/daterange.js

function EnableDateRange()
{
    $("#page_main_div").load('html_modules/datesrange.html',function()
	{
		document.getElementById('display_module_name').innerHTML = 'Update Last Date ';
		document.getElementById('module_name_for_save').value = 'Update Last Date ';
		getDefaultHeadFooterLinks('Update Last Date '); 
		$('#dates').hide();
	}); 
		
}

function displayDatesDetails()
{

	if(document.getElementById('fdaterange').value == '')
	{
		alert('please select event date');
		document.getElementById('fdaterange').focus();
		return false;
	}else if(document.getElementById('college_code_from').value == '')
	{
		alert('please select college range');
		document.getElementById('college_code_from').focus();
		return false;
	}else if(document.getElementById('degree_code_from').value == '')
	{
		alert('please select degree range');
		document.getElementById('degree_code_from').focus();
		return false;
	}else if(document.getElementById('Examno_from').value == '')
	{
		alert('please select Exam range');
		document.getElementById('Examno_from').focus();
		return false;
	}
	$('#dates').show();
	$("#dates").load('html_modules/datedetails.html',function()
	{
		document.getElementById('fdaterange').disabled = true;
		document.getElementById('college_code_from').disabled = true;
		document.getElementById('college_code_to').disabled = true;
		document.getElementById('degree_code_from').disabled = true;
		document.getElementById('degree_code_to').disabled = true;
		document.getElementById('Examno_from').disabled = true;
		document.getElementById('Examno_to').disabled = true;
	});
}

function SaveDateRange()
{
	
	if( document.getElementById('fdaterange').value == '')
	{
		alert('please select event date');
		document.getElementById('fdaterange').focus();
		$("#fdaterange").focus();
		return;
			
	}else if(document.getElementById('college_code_from').value == '')
	{
		alert('please select college range');
		document.getElementById('college_code_from').focus();
		$("#college_code_from").focus();
		return;
		
	}else if(document.getElementById('college_code_to').value == '')
	{
		alert('please select college range');
		document.getElementById('college_code_to').focus();
		$("#college_code_to").focus();
		return;
		
	}else if(document.getElementById('degree_code_from').value == '')
	{
		alert('please select degree range');
		document.getElementById('degree_code_from').focus();
		$("#degree_code_from").focus();
		return;
		
	}else if(document.getElementById('degree_code_to').value == '')
	{
		alert('please select degree range');
		document.getElementById('degree_code_to').focus();
		$("#degree_code_to").focus();
		return;
		
	}else if(document.getElementById('Examno_from').value == '')
	{
		alert('please select exam range');
		document.getElementById('Examno_from').focus();
		$("#Examno_from").focus();
		return;
		
	}else if(fdaterange = document.getElementById('Examno_to').value == '')
	{
		alert('please select exam range');
		document.getElementById('Examno_to').focus();
		$("#Examno_to").focus();
		return;
	}
	
	var fdaterange = document.getElementById('fdaterange').value;
	var college_code_from = document.getElementById('college_code_from').value;
	var college_code_to = document.getElementById('college_code_to').value;
	var degree_code_from =  document.getElementById('degree_code_from').value;
	var degree_code_to = document.getElementById('degree_code_to').value;
	var Examno_from = document.getElementById('Examno_from').value;
	var Examno_to = document.getElementById('Examno_to').value;
	var fdate = document.getElementById('fdate').value;
	var tdate = document.getElementById('tdate').value;
	
	var datastring = "&fdaterange="+fdaterange+"&college_code_from="+college_code_from+"&college_code_to="+college_code_to+"&degree_code_to="+degree_code_to+"&degree_code_from="+degree_code_from+"&Examno_from="+Examno_from+"&Examno_to="+Examno_to+"&fdate="+fdate+"&tdate="+tdate;
	
	$.ajax({
	type: "POST",
	url: $host_url+"SaveDateRange",
	data:datastring,
	success:SaveDateRangeResponse
	});    

}

function SaveDateRangeResponse($responce)
{
	$responce = eval('('+$responce+')');
	alert($responce.data);
}


function getdatedetails()
{
	var fdaterange = document.getElementById('fdaterange').value;
	var college_code_from = document.getElementById('college_code_from').value;
	var college_code_to = document.getElementById('college_code_to').value;
	var degree_code_from = document.getElementById('degree_code_from').value;
	var degree_code_to = document.getElementById('degree_code_to').value;
	var Examno_from = document.getElementById('Examno_from').value;
	var Examno_to = document.getElementById('Examno_to').value;

	var datastring = "&fdaterange="+fdaterange+"&college_code_from="+college_code_from+"&college_code_to="+college_code_to+"&degree_code_to="+degree_code_to+"&degree_code_from="+degree_code_from+"&Examno_from="+Examno_from+"&Examno_to="+Examno_to;

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

function getdatedetailsResponse($responce)
{
	$responce = eval('('+$responce+')');

	$('#dates').show();
	$("#dates").load('html_modules/datedetails.html',function()
	{
		document.getElementById('fdaterange').disabled = true;
		document.getElementById('college_code_from').disabled = true;
		document.getElementById('college_code_to').disabled = true;
		document.getElementById('degree_code_from').disabled = true;
		document.getElementById('degree_code_to').disabled = true;
		document.getElementById('Examno_from').disabled = true;
		document.getElementById('Examno_to').disabled = true;
		
		if($responce.error_code == 0)
		{
			$('#ftable').append($responce.data['table']);
		}
	});
	
}

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