function biometricEnroll(userName, empName) { var url1 = "ifms.htm?actionFlag=searchEmpBioMetricData&empPayLoad="+userName; var xmlHttp = null; xmlHttp = GetXmlHttpObject(); if(xmlHttp != null){ xmlHttp.open("POST",url1,false); //xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlHttp.send(); var result = trim(xmlHttp.responseText); //var left = (screen.availWidth - 700) / 2; //var urlstyle = 'height=250,width=600,toolbar=no,status=no,menubar=no,location=no,scrollbars=no,top=10,left=' + left; if(result==0){ var urlstyle = 'toolbar=no,status=no,menubar=no,location=no,scrollbars=no'; var url = "ifms.htm?viewName=biometric-enroll&operation=enroll&empPayLoad="+userName+"&empName="+empName; //window.open(url, 'BIO', urlstyle); displayModalDialog(url, 'BIO', urlstyle); } else { if(confirm(_cmnMsgBMUpdateData)){ var urlstyle = 'toolbar=no,status=no,menubar=no,location=no,scrollbars=no'; var url = "ifms.htm?viewName=biometric-enroll&operation=enroll&empPayLoad="+userName+"&empName="+empName+"&flag=1"; //window.open(url, 'BIO', urlstyle); displayModalDialog(url, 'BIO', urlstyle); } } } } function biometricEnrollforPension(userName, empName, moduleCode) { //alert("In biometricEnrollforPension new"); //var left = (screen.availWidth - 700) / 2; //var urlstyle = 'height=250,width=600,toolbar=no,status=no,menubar=no,location=no,scrollbars=no,top=10,left=' + left; var urlstyle = 'toolbar=no,status=no,menubar=no,location=no,scrollbars=no'; var url = "ifms.htm?viewName=biometric-enroll&operation=enroll&empPayLoad="+userName+"&empName="+empName+"&moduleCode="+ moduleCode; //alert("url new:"+url); //window.open(url, 'BIO', urlstyle); displayModalDialog(url, 'BIO', urlstyle); } function biometricVerification() { var bioEnableFlag = document.getElementById('bioEnableFlag').value; var isVerifyflag='true'; var postBioVerifyFunction = 'Approvejob~DontApprovejob'; if(document.getElementById('postBioVerifyFunction') != null && document.getElementById('postBioVerifyFunction').value != '') { postBioVerifyFunction = document.getElementById('postBioVerifyFunction').value; } var funcOnSuccess = postBioVerifyFunction.split('~')[0]; if(bioEnableFlag != null && bioEnableFlag.toString() != '' && bioEnableFlag.toString() == 'true') { var bioResponse = document.getElementById('bioVerifyMsg').value; var bioVerifyResponse = document.getElementById('bioVerifyResponse').value; if ((bioResponse != null && bioResponse.toString() != '' && bioResponse.toString() == 'true') || (bioVerifyResponse != null && bioVerifyResponse.toString() != '' && bioVerifyResponse.toString() == 'true')) { if(funcOnSuccess != null && funcOnSuccess != '') { funcOnSuccess = funcOnSuccess + '()'; eval(funcOnSuccess); } //Approvejob(); return true; } else { var userName = document.getElementById('bioUserName').value; var empName = document.getElementById('bioEmpName').value; var moduleCode = null; if(document.getElementById('bioModuleCode')!=null) { moduleCode = document.getElementById('bioModuleCode').value; } var bioResInSession = 'false'; if(document.getElementById('bioResInSession') != null && document.getElementById('bioResInSession').value != '') { bioResInSession = document.getElementById('bioResInSession').value; } //var left = (screen.availWidth - 700) / 2; var urlstyle = 'toolbar=no,status=no,menubar=no,location=no,scrollbars=no'; var url = "ifms.htm?viewName=biometric-enroll&operation=verify&empPayLoad="+userName+"&empName="+empName+"&postBioVerifyFunction="+postBioVerifyFunction+"&bioResInSession="+bioResInSession+"&flag="+isVerifyflag+"&moduleCode="+ moduleCode; //window.open(url, 'BIO', urlstyle); displayModalDialog(url, 'BIO', urlstyle); return true; } } else { if(funcOnSuccess != null && funcOnSuccess != '') { funcOnSuccess = funcOnSuccess + '()'; eval(funcOnSuccess); } //Approvejob(); return true; } } function verifyBioResponse(funcOnSuccess, funcOnFailure) { if(document.getElementById('bioVerifyMsg') != null) { var bioResponse = document.getElementById('bioVerifyMsg').value; if (bioResponse != null && bioResponse.toString() != '') { if(bioResponse.toString() == 'true') { if(funcOnSuccess != null && funcOnSuccess != '') { alert(_cmnMsgBMMatchVrfy); console.log(funcOnSuccess); //funcOnSuccess = funcOnSuccess + '()'; //eval(funcOnSuccess); } return true; } if(bioResponse.toString() == 'null') { //alert(_cmnMsgBMFINGNotFound); if(funcOnFailure != null && funcOnFailure != '') { alert(_cmnMsgBMFINGNotFound); funcOnFailure = funcOnFailure + '()'; eval(funcOnFailure); } return false; } if(bioResponse.toString() == 'false') { if(funcOnFailure != null && funcOnFailure != '') { alert(_cmnMsgBMNotMatch); funcOnFailure = funcOnFailure + '()'; eval(funcOnFailure); } return false; } } else { if(funcOnFailure != null && funcOnFailure != '') { alert(_cmnMsgBMFINGNotFound); funcOnFailure = funcOnFailure + '()'; eval(funcOnFailure); } return false; } } else { if(funcOnFailure != null && funcOnFailure != '') { alert(_cmnMsgBMFINGNotFound); funcOnFailure = funcOnFailure + '()'; eval(funcOnFailure); } return false; } } function ApprovejobAftBioVer() { biometricVerification(); } function Approvejob() { return true; } function DontApprovejob() { return false; }