Tuesday, January 28, 2014

calculate mathematical operation in javascript by html id


You can easily calculate any mathematical expression in JavaScript using the senerio.



  // get element by id value for calculation  
     var NoOfDays = parseFloat(NoOfDays);  
     var MnyGrossSalary = parseFloat(MnyGrossSalary);  
     var ServiceBenefitDay = parseFloat(ServiceBenefitDay);  
     var EarnLeaveDepositedToCompany = parseFloat(EarnLeaveDepositedToCompany);  
     // Calculate your mathematical Expression  
     var totalBenefitDayAmount = ServiceBenefitDay * (MnyGrossSalary / NoOfDays);  
     var totalEarnLeaveAmount = EarnLeaveDepositedToCompany * (MnyGrossSalary / NoOfDays);  
     // Set value of your mathematical expression in your desire html control by id  
     document.getElementById('ServiceBenifitPayment_TotalBenefitDayAmount').value = parseFloat(totalBenefitDayAmount, 10).toFixed(2);  
     document.getElementById('ServiceBenifitPayment_TotalEarnLeaveAmount').value = parseFloat(totalEarnLeaveAmount, 10).toFixed(2);  


vfpoledeb.1 provider is not registered on the local machine

Have u Install VFP Ole DB Provider in your System ? If No then Please Install it from following link. http://www.microsoft.com/download...