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.12.76.168
var path_name=window.location.pathname.split('/')[1];
if(path_name=='registration.php' || path_name=='enable_payment.php'||
path_name=='index.php'||
path_name=='make_payment.php'||
path_name=='registration.php'||
path_name=='print_app_form.php')
path_name="";
var $host_url="http://"+window.location.host+"/"+path_name+"/app.php?a=";
$g_dropdown_data='';
$g_edit_app_code=0;
function GetUrlParameters()
{
var url_object=new Object();
var data_set=window.location.href.split("?");
if(data_set.length>1)
{
var params_set=data_set[1].split("&");
for(i=0;i<params_set.length;i++)
{
var pv=params_set[i];
var pvv=pv.split("=");
url_object[pvv[0]]=pvv[1];
}
}
return url_object;
}
function GetDropdownMenuValues()
{
$.ajax({
type: "POST",
async:false,
url: $host_url+"GetDropdownMenuValues",
success: GetDropdownMenyValuesResponce
});
}
function GetDropdownMenyValuesResponce(responce)
{
responce = eval('(' + responce + ')');
$g_dropdown_data=responce.data;
var distict=responce.data['distict'];
var category=responce.data['category'];
var subject=responce.data['subject'];
var fcntrcode=responce.data['center'];
var fdeptcode=responce.data['fdeptcode'];
FillDropdownValues(fcntrcode,'fcntrcode');
FillDropdownValues(subject,'fsubcode');
FillDropdownValues(category,'fcatcode');
FillDropdownValues(fdeptcode,'fdeptcode');
}
$g_category_dd_amt=new Object();
function FillDropdownValues(arr,ele_name)
{
document.getElementById(ele_name).options.length=0;
jQuery.each(arr, function(k, v) {
var op = new Option(v['name'], v['code']);
op.id=v['code'];
document.getElementById(ele_name).options.add(op);
if(ele_name=='fcatcode')
{
$g_category_dd_amt[v['code']]=v['FPGETFEE'];
}
});
}
function OnLoadScreen()
{
var path="src/details.html"
$('#main_page').load(path,function()
{
$g_edit_app_code=0;
GetDropdownMenuValues();
showHideInserviceTable();
AssignDDAmount();
$("#student_entry_upload").val("");
$("#fdob").mask({mask: "##/##/####"}) ;
$("#fdos").mask({mask: "##/##/####"}) ;
$("#fdop").mask({mask: "##/##/####"}) ;
$("#fpgcompdate").mask({mask: "##/##/####"}) ;
$('.submit_div_button').corner("5px");
EnableDisableProbDeclaredDate();
EnableDisableSpecialityCourse();
});
}
function AssignDDAmount()
{
var category=$("#fcatcode").val();
amt=$g_category_dd_amt[category];
$("#famount").val(amt);
}
function acceptNumbersOnlyForModule(evt)
{
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 41 && (charCode < 48 || charCode > 57) && charCode!=47 && charCode!=99 && charCode!=118 && charCode!=120 && charCode!=46 )
return false;
return true;
}
function showHideInserviceTable()
{
var finservice=$("input[name='finservice']:checked").val();
if(finservice=="Yes")
{
$("#table_content_hide").show();
}
else
$("#table_content_hide").hide();
}
function EnableDisableProbDeclaredDate()
{
var fprobdecl=$("input[name='fprobdecl']:checked").val();
if(fprobdecl=="Yes")
{
$("#fdop").removeAttr('disabled', 'disabled');
}
else
{
$("#fdop").attr('disabled', 'disabled');
}
} function EnableDisableSpecialityCourse()
{
var fpgdegree=$("input[name='fpgdegree']:checked").val();
if(fpgdegree=="Yes")
{
$("#fpgdescpn").removeAttr('disabled', 'disabled');
$("#fpgcompdate").removeAttr('disabled', 'disabled');
}
else
{
$("#fpgdescpn").attr('disabled', 'disabled');
$("#fpgcompdate").attr('disabled', 'disabled');
}
}
function saveStudentEntry()
{
AssignDDAmount();
var data_url="";
var fcntrcode=$("#fcntrcode").val();data_url+="&fcntrcode="+fcntrcode;
var fsubcode=$("#fsubcode").val();data_url+="&fsubcode="+fsubcode;
var fname=encodeURIComponent(trim($("#fname").val()));data_url+="&fname="+fname;
var fmotname=encodeURIComponent(trim($("#fmotname").val())); data_url+="&fmotname="+fmotname;
var ffatname=encodeURIComponent(trim($("#ffatname").val())); data_url+="&ffatname="+ffatname;
var fspousename=encodeURIComponent(trim($("#fspousename").val())); data_url+="&fspousename="+fspousename;
var fdob=$("#fdob").val();data_url+="&fdob="+date_format(fdob);
var fgender=$("input[name='fgender']:checked").val();data_url+="&fgender="+fgender;
var fpob=encodeURIComponent(trim($("#fpob").val()));data_url+="&fpob="+fpob;
var fcatcode=$("#fcatcode").val();data_url+="&fcatcode="+fcatcode;
/* var freligion=$("#freligion").val();data_url+="&freligion="+freligion;
var fcaste=$("#fcaste").val();data_url+="&fcaste="+fcaste;
var fsubcaste=$("#fsubcaste").val();data_url+="&fsubcaste="+fsubcaste; */
var fnational=$("#fnational").val();data_url+="&fnational="+fnational;
var fqualexam=$("#fqualexam").val();data_url+="&fqualexam="+fqualexam;
var fqualdur=$("#fqualdur").val();data_url+="&fqualdur="+fqualdur;
var fcollname=$("#fcollname").val();data_url+="&fcollname="+fcollname;
var funivname=$("#funivname").val();data_url+="&funivname="+funivname;
var fregno=$("#fregno").val();data_url+="&fregno="+fregno;
var fadmyear=$("#fadmyear").val();data_url+="&fadmyear="+fadmyear;
var fpassyear=$("#fpassyear").val();data_url+="&fpassyear="+fpassyear;
var fattempts=$("#fattempts").val();data_url+="&fattempts="+fattempts;
var fpermmcregno=$("#fpermmcregno").val();data_url+="&fpermmcregno="+fpermmcregno;
var fstmcno=$("#fstmcno").val();data_url+="&fstmcno="+fstmcno;
var fcentmcno=encodeURIComponent($("#fcentmcno").val());data_url+="&fcentmcno="+fcentmcno;
var foccupation=encodeURIComponent($("#foccupation").val());data_url+="&foccupation="+foccupation;
var fadd1=encodeURIComponent($("#fadd1").val());data_url+="&fadd1="+fadd1;
var fpincode=$("#fpincode").val();data_url+="&fpincode="+fpincode;
var fphone=encodeURIComponent($("#fphone").val());data_url+="&fphone="+fphone;
var fmobile=encodeURIComponent($("#fmobile").val());data_url+="&fmobile="+fmobile;
var femail=encodeURIComponent($("#femail").val());data_url+="&femail="+femail;
var famount=$("#famount").val();data_url+="&famount="+famount;
var finservice=$("input[name='finservice']:checked").val();data_url+="&finservice="+finservice;
var fdeptcode=encodeURIComponent(trim($("#fdeptcode").val()));data_url+="&fdeptcode="+fdeptcode;
var fworkplace=encodeURIComponent(trim($("#fworkplace").val()));data_url+="&fworkplace="+fworkplace;
var fservrend=encodeURIComponent(trim($("#fservrend").val()));data_url+="&fservrend="+fservrend;
var fspeciality=encodeURIComponent(trim($("#fspeciality").val()));data_url+="&fspeciality="+fspeciality;
var fdos=date_format(trim($("#fdos").val()));data_url+="&fdos="+fdos;
var fprobdecl=$("input[name='fprobdecl']:checked").val();data_url+="&fprobdecl="+fprobdecl;
var fdop=date_format(trim($("#fdop").val()));data_url+="&fdop="+fdop;
var fpgdegree=$("input[name='fpgdegree']:checked").val();data_url+="&fpgdegree="+fpgdegree;
var fpgdescpn= encodeURIComponent(trim($("#fpgdescpn").val()));data_url+="&fpgdescpn="+fpgdescpn;
var fpgcompdate= (date_format($("#fpgcompdate").val()));data_url+="&fpgcompdate="+fpgcompdate;
var fenquiry=$("input[name='fenquiry']:checked").val();data_url+="&fenquiry="+fenquiry;
var fsuspension=$("input[name='fsuspension']:checked").val();data_url+="&fsuspension="+fsuspension;
var fabsence=$("input[name='fabsence']:checked").val();data_url+="&fabsence="+fabsence;
var fremarks=encodeURIComponent(trim($("#fremarks").val()));data_url+="&fremarks="+fremarks;
if(empty(fname))
{
alert("Please Enter the Candidate Name");
$("#fname").focus();
return false;
}
else if(empty(fmotname))
{
alert("Please Enter the Mother Name");$("#fmotname").focus();
return false;
}else if(empty(ffatname))
{
alert("Please Enter the Father Name");$("#ffatname").focus();
return false;
}
else if(!isDate(fdob,'d/M/y'))
{
alert("Please Enter the Date Of Birth as dd/mm/yyyy");$("#fdob").focus();
return false;
}
else if(empty(fpob))
{
alert("Please Enter the Place of Birth");$("#fpob").focus();
return false;
}
else if(empty(fcatcode))
{
alert("Please Enter the Category");$("#fcatcode").focus();
return false;
}
else if(empty(fqualexam))
{
alert("Please Enter the Qualifying exam");$("#fqualexam").focus();
return false;
}
else if(empty(fqualdur))
{
alert("Please Enter the Duration of Course");$("#fqualdur").focus();
return false;
}
else if(empty(fcollname))
{
alert("Please Enter the Collage name");$("#fcollname").focus();
return false;
}
else if(empty(funivname))
{
alert("Please Enter the University Name ");$("#funivname").focus();
return false;
}
else if(empty(fregno))
{
alert("Please Enter the Registration Number");$("#fregno").focus();
return false;
}
else if(empty(fadmyear))
{
alert("Please Enter the Month and year of admission");$("#fadmyear").focus();
return false;
}
else if(empty(fpassyear))
{
alert("Please Enter the Month and year of passing");$("#fpassyear").focus();
return false;
}
else if(empty(fattempts))
{
alert("Please Enter the Number of attempts taken");$("#fattempts").focus();
return false;
}
else if(empty(fpincode))
{
alert("Please Enter the Pin Code");$("#fpincode").focus();
return false;
}
else if(empty(fphone))
{
alert("Please Enter the Phone Number");$("#fphone").focus();
return false;
}
else if(empty(fmobile))
{
alert("Please Enter the Mobile No.");$("#fmobile").focus();
return false;
}
else if(empty(femail))
{
alert("Please Enter the Email Id");$("#femail").focus();
return false;
}
if(finservice=="Yes")
{
if(empty(fworkplace))
{
alert("Please Enter the Working place.");$("#fworkplace").focus();
return false;
}
else if(fprobdecl=="Yes" && (empty($("#fdop").val()) || $("#fdop").val()=="00/00/0000"))
{
alert("Please Enter the Probationary period declared date ");$("#fdop").focus();
return false;
}
else if(fpgdegree=="Yes")
{
if(empty($("#fpgdescpn").val()))
{
alert("Subject in which PG Super Speciality undergoing / done ");$("#fpgdescpn").focus();
return false;
}
else if(empty($("#fpgcompdate").val()) || $("#fpgcompdate").val()=="00/00/0000")
{
alert("Date of completion of PG Super Speciality ");$("#fpgcompdate").focus();
return false;
}
}
else if(!isDate($("#fdop").val(),'d/M/y') && fdop!="0000-00-00")
{
alert("Probationary period declared date as dd/mm/yyyy");$("#fdop").focus();
return false;
}
}
var loaded_html=window.location.href.substring(eval(window.location.href.lastIndexOf("/")+1));
if(document.getElementById("student_entry_upload").value == '' && loaded_html=="registration.php" && $g_edit_app_code==0)
{
alert('Please Browse the Photo..!!');
document.getElementById("student_entry_upload").focus();
return;
}
var valid_file_extentions = new Array("jpeg","jpg",'png','gif');
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("Please Select the Valid Photo!");
return false;
}
data_url+="&filepath="+filepath;
data_url+="&edit_app_code="+$g_edit_app_code;
var upload = $host_url+"saveStudentEntry&"+data_url;
document.getElementById("form_module_image_upload").setAttribute("action", upload);
//$.blockUI({ message: "<h1 class='h1' style='font-size:12px'>Uploading... <img src='img/spinner.gif' border='0'></h1>" });
return AIM.submit(document.getElementById("form_module_image_upload"), 'same_tab',{'onComplete' : saveStudentEntryResponse});
}
function PayLater(app_no)
{
alert("Your Application No. is "+app_no+".");
home();
}
function AssignSaveButtonDiv(type,app_no)
{
if(type=='Payment')
{
var html="<div class='submit_div_button1' onclick='MakePayment("+app_no+");' ><div class='button_text'>Make Payment</div></div>";
html+="<div class='submit_div_button1' onclick='PayLater("+app_no+");'><div class='button_text'>Pay Later</div></div>";
html+="<div class='submit_div_button1' onclick='GetApplicationDetails("+app_no+");' ><div class='button_text'>Edit Application</div></div>";
html+="<div class='submit_div_button1' onclick='OnLoadScreen();' ><div class='button_text'>Cancel</div></div>";
$("#save_div").html(html);
$('.submit_div_button1').corner("5px");
}
else
{
var html="<div class='submit_div_button' onclick='saveStudentEntry();' ><div class='button_text'>Submit</div></div>";
html+="<div class='submit_div_button' onclick='ClearStudentEntry();'><div class='button_text'>Clear</div></div>";
$("#save_div").html(html);
$('.submit_div_button').corner("5px");
}
if(app_no>0)
{
alert("Your Application No. is "+app_no+".");
$("#app_no_div1").remove();
var app_text_div="<div id='app_no_div1'><span id='app_no_div_span1' >Application No : <b>"+app_no+"</b></span></div>";
$("#save_div").before(app_text_div);
$("#app_no_div_span").html("Application No : <b>"+app_no+"</b>");
}
}
function saveStudentEntryResponse(response)
{
response = eval('(' + response + ')');
$.unblockUI();
if(response.error_code==0)
{
var app_no=response.data;
AssignSaveButtonDiv('Payment',app_no);
EnableDisableStudentFields("Disable");
}
else if(response.error_code==9)
{
var app_no=response.data;
alert("Updated Successfully");
AssignSaveButtonDiv("Payment",app_no);
EnableDisableStudentFields("Disable");
}
else
{
alert(response.data);
}
}
function home()
{
window.location.href="index.php";
}
function MakePayment(app_no)
{
window.location.href="make_payment.php?app_no="+app_no;
}function GenerateHallTicket(app_no)
{
window.location.href=$host_url+"PrintapplicationidDetails&app_no="+app_no+"&type=Student";
}
function printApplicationFormFromUI()
{
$("#error_div").hide();
var app_no=$("#txtApplicationNo").val();
var fdob=$("#fdob").val();
$("#error_div").html("");
if(empty(trim(app_no)))
{
alert("Enter your application No.");
$("#txtApplicationNo").focus();
return false;
}
else if(empty(trim(fdob)))
{
alert("Enter your Date of Birth");
$("#fdob").focus();
return false;
}
var lstr_data="&app_no="+app_no+"&fdob="+date_format(fdob);
$.ajax({
type: "POST",
async:false,
data:lstr_data,
url: $host_url+"CheckPrintAppNo",
success:function CheckPrintAppNoResponce(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code==0)
{
window.location.href=$host_url+"GenerateApplicationFormPdfReport&app_no="+app_no;
}
else if(responce.error_code==-1)
{
$("#error_div").show();
$("#error_div").html("Invalid Applicaion Id.");
}else if(responce.error_code==-2)
{
$("#error_div").show();
$("#error_div").html("Payment is Pending");
}
}
});
}
function EnablePayment()
{
var app_no=$("#txtApplicationNo").val();
var fdob=$("#fdob").val();
$("#error_div").html("");
$("#error_div").hide();
if(empty(trim(app_no)))
{
alert("Enter your application No.");
$("#txtApplicationNo").focus();
return false;
}
else if(empty(trim(fdob)))
{
alert("Enter your Date of Birth");
$("#fdob").focus();
return false;
}
var lstr_data="&app_no="+app_no+"&fdob="+date_format(fdob);
$.ajax({
type: "POST",
async:false,
data:lstr_data,
url: $host_url+"CheckPaymentAppNo",
success:function CheckPaymentAppNoResponce(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code==0)
{
window.location.href="make_payment.php?app_no="+app_no;
}
else
{
$("#error_div").html("Invalid Applicaion Id.");
$("#error_div").show();
}
}
});
}
function EnableAppStatus()
{
var app_no=$("#txtApplicationNo").val();
var fdob=$("#fdob").val();
$("#error_div").html("");
$("#error_div").hide();
if(empty(trim(app_no)))
{
alert("Enter your application No.");
$("#txtApplicationNo").focus();
return false;
}
else if(empty(trim(fdob)))
{
alert("Enter your Date of Birth");
$("#fdob").focus();
return false;
}
var lstr_data="&app_no="+app_no+"&fdob="+date_format(fdob);
$.ajax({
type: "POST",
async:false,
data:lstr_data,
url: $host_url+"CheckPaymentAppNo",
success:function EnableAppStatusResponce(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code==0)
{
window.location.href="hall_ticket.php?app_no="+app_no;
}
else
{
$("#error_div").html("Invalid Applicaion Id.");
$("#error_div").show();
}
}
});
}
function GetApplicationDetails(app_no)
{
$g_edit_app_code=app_no;
if(app_no>0)
{
var lstr_data="&app_no="+app_no;
$.ajax({
type: "POST",
async:false,
data:lstr_data,
url: $host_url+"GetApplicationDetails",
success: GetApplicationDetailsResponce
});
}
}
function GetApplicationDetailsResponce(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code==0)
{
EnableDisableStudentFields("Enable");
data_set=responce.data;
app_no=data_set['app_no'];
$("#fcntrcode").val(data_set['fcntrcode']);
$("#fsubcode").val(data_set['fsubcode']);
$("#fname").val(data_set['fname']);
$("#fmotname").val(data_set['fmotname']);
$("#ffatname").val(data_set['ffatname']);
$("#fspousename").val(data_set['fspousename']);
$("#fdob").val(data_set['fdob']);
$("#fpob").val(data_set['fpob']);
$('input:radio[name="fgender"]').filter("[value='"+data_set['fgender']+"']").attr('checked', true);
$("#fcatcode").val(data_set['fcatcode']);
/* $("#freligion").val(data_set['freligion']);
$("#fcaste").val(data_set['fcaste']);
$("#fsubcaste").val(data_set['fsubcaste']); */
$("#fnational").val(data_set['fnational']);
$("#fqualexam").val(data_set['fqualexam']);
$("#fqualdur").val(data_set['fqualdur']);
$("#fcollname").val(data_set['fcollname']);
$("#funivname").val(data_set['funivname']);
$("#fregno").val(data_set['fregno']);
$("#fadmyear").val(data_set['fadmyear']);
$("#fpassyear").val(data_set['fpassyear']);
$("#fattempts").val(data_set['fattempts']);
$("#fpermmcregno").val(data_set['fpermmcregno']);
$("#fstmcno").val(data_set['fstmcno']);
$("#fcentmcno").val(data_set['fcentmcno']);
$("#foccupation").val(data_set['foccupation']);
$("#fadd1").val(data_set['fadd1']);
$("#fpincode").val(data_set['fpincode']);
$("#fphone").val(data_set['fphone']);
$("#fmobile").val(data_set['fmobile']);
$("#femail").val(data_set['femail']);
$('input:radio[name="finservice"]').filter("[value='"+data_set['finservice']+"']").attr('checked', true);
$("#fdeptcode").val(data_set['fdeptcode']);
$("#fworkplace").val(data_set['fworkplace']);
$("#fservrend").val(data_set['fservrend']);
$("#fspeciality").val(data_set['fspeciality']);
$('input:radio[name="fphdisable"]').filter("[value='"+data_set['fphdisable']+"']").attr('checked', true);
$("#fdos").val(data_set['fdos']);
$('input:radio[name="fprobdecl"]').filter("[value='"+data_set['fprobdecl']+"']").attr('checked', true);
$("#fdop").val(data_set['fdop']);
$('input:radio[name="fprobdecl"]').filter("[value='"+data_set['fprobdecl']+"']").attr('checked', true);
$('input:radio[name="fpgdegree"]').filter("[value='"+data_set['fpgdegree']+"']").attr('checked', true);
$("#fpgdescpn").val(data_set['fpgdescpn']);
$("#fpgcompdate").val(data_set['fpgcompdate']);
$('input:radio[name="fenquiry"]').filter("[value='"+data_set['fenquiry']+"']").attr('checked', true);
$('input:radio[name="fsuspension"]').filter("[value='"+data_set['fsuspension']+"']").attr('checked', true);
$('input:radio[name="fabsence"]').filter("[value='"+data_set['fabsence']+"']").attr('checked', true);
$("#fremarks").val(data_set['fremarks']);
showHideInserviceTable();
$("#student_entry_photo").attr("src", data_set['photo_path']);
AssignSaveButtonDiv("Save",app_no);
}
}
function ClearStudentEntry()
{
OnLoadScreen();
}
function EnableDisableStudentFields(s_type)
{
var input_obj=$("#main_page input");
jQuery.each(input_obj, function(k, v)
{
var id=v['id'];
var name=v['name'];
var type=v['type'].toLowerCase();
if(type=='radio')
{
if(s_type=='Disable')
$('input:radio[name="'+name+'"]').attr('disabled', 'disabled');
else
$('input:radio[name="'+name+'"]').removeAttr('disabled', 'disabled');
}
else
{
if(s_type=='Disable')
{
$("#"+id).attr('disabled', 'disabled');
}
else
{
$("#"+id).removeAttr('disabled', 'disabled');
}
}
});
if(s_type=='Disable')
{
$("#fsubcode").attr('disabled', 'disabled');
$("#fcatcode").attr('disabled', 'disabled');
}
else
{
$("#fsubcode").removeAttr('disabled', 'disabled');
$("#fcatcode").removeAttr('disabled', 'disabled');
}
$("#famount").attr('disabled', 'disabled');
}
function DisplayUserSelectedPhoto()
{
var valid_file_extentions = new Array("jpeg","jpg",'png','gif');
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!");
return false;
}
var lstr_data="&filepath="+filepath;
$upload = $host_url+"DiaplayUserSelectedPhoto&"+lstr_data;
document.getElementById("form_module_image_upload").setAttribute("action",$upload);
return AIM.submit(document.getElementById("form_module_image_upload"), 'report_display',{'onComplete' : DiaplayUserSelectedPhotoResponse});
}
function DoAxisBankPayment()
{
var app_no=trim($("#app_no").html());
var payment_type=trim($("#payment_type").val());
app_no=app_no.replace(":","");
var fextamt=trim($("#fextamt").html());
var ftotal=trim($("#ftotal").html());
if(payment_type=="Select")
{
alert("Select payment type");
return false;
}
var lstr_data="&app_no="+app_no+"&ftotal="+ftotal+"&fextamt="+fextamt+"&payment_type="+payment_type;
$.ajax({
type: "POST",
async:false,
data:lstr_data,
url: $host_url+"DoAxisBankPayment",
success: function DoAxisBankPaymentResponce(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code==0)
{
window.location.href="payment_gateway.php?app_no="+app_no+"&ftotal="+ftotal;
}
}
});
//
}
function CalculateCardFee()
{
var payment_type=trim($("#payment_type").val());
var famount=parseFloat(trim($("#famount").html()));
var fextamt=0;
var ftotal=0;
if(payment_type=="Credit Card")
{
fextamt=71;
}
else if(payment_type=="Debit Card")
{
fextamt=57;
}
$("#fextamt").html(fextamt);
ftotal=eval(fextamt+famount);
$("#ftotal").html(ftotal);
}
function DiaplayUserSelectedPhotoResponse($responce)
{
$responce = eval('(' + $responce + ')');
if($responce.error_code==0)
$("#student_entry_photo").attr("src", $responce.data);
else if($responce.error_code==-1)
$("#student_entry_photo").attr("src", "images/default_photo.jpg");
else if($responce.error_code==-2)
{
alert($responce.data);
$("#student_entry_photo").attr("src", "images/default_photo.jpg");
$("#student_entry_upload").val("");
}
}
function trim($str)
{
return jQuery.trim($str);
}
function empty (mixed_var) {
var key;
if (mixed_var === "" ||
mixed_var === 0 ||
mixed_var === "0" ||
mixed_var === null || mixed_var === false ||
typeof mixed_var === 'undefined'
){
return true;
}
if (typeof mixed_var == 'object') {
for (key in mixed_var) {
return false;
} return true;
}
return false;
}
function in_array(needle, haystack, argStrict) {
var key = '', strict = !!argStrict;
if (strict) {
for (key in haystack) {
if (haystack[key] === needle) {
return true;
}
}
} else {
for (key in haystack) {
if (haystack[key] == needle) {
return true;
}
}
}
return false;
}
function date_format($str)
{
if(trim($str)=="" || $str=="undefined")
return "0000-00-00";
else
{
var indx=$str.indexOf("/");
if(indx==-1)
return $str;
else
{
$date=$str.split('/');
return($date[2] +'-'+$date[1]+'-'+$date[0]);
}
}
}
function tarkaRound(number,position)
{
var zeors = 1;
for(var i =1; i<=position; i++)
{
zeors = zeors * 10 ;
}
return Math.round(number*zeors)/zeors;
}
function GetapplicationidDetails()
{
var app_id=$("#app_id").val();
var reg_no=$("#reg_no").val();
var dob=$("#dob").val();
if(empty(app_id) && empty(reg_no))
{
alert("Enter the Application no");
$("#app_id").focus()
return;
}
/* else if(empty(dob) || dob=="00/00/0000")
{
alert("Please Enter the Date Of Birth as dd/mm/yyyy");$("#dob").focus();
return false;
}
else if(!isDate(dob,'d/M/y'))
{
alert("Please Enter the Date Of Birth as dd/mm/yyyy");$("#dob").focus();
return false;
} */
$("#page_main_div").html("");
var lstr_data="&app_id="+app_id;
lstr_data+="®_no="+(reg_no);
$.ajax({
type: "POST",
async:false,
data:lstr_data,
url: $host_url+"GetapplicationidDetails",
success: GetapplicationidDetailsResponce
});
}
function GetapplicationidDetailsResponce(responce)
{
responce = eval('(' + responce + ')');
$("#page_main_div").html(responce.data);
}
|