^Back to Top

Calculator Mall

Free Calculators

Financial Calculators , Mortgage Calculators: Fixed Mortgage, Adjustable Rate Mortgages ARM, Mortgage APR Calculators and More! Financial Calculators you can put on your website! Colorful, interactive, graphing financial calculators. Free downloads! Calculator Trial Period Ended For:, KJE Calculator License Not Found for:, Free Financial Calculators

Knowledge Base - How do I change default values for a specific calculator?

You can change any default values for a calculator by editing the calculator's specific PARAMS file. Each calculator should have a file with the extension Params.js. For example, the Mortgage Loan Calculator uses the files that begin with "MortgageLoan". All default parameters are contained within the file MortgageLoanParams.js. Edit this file to change values. For example, the file will start with the following parameters defined:

KJE.parameters.set("INTEREST_RATE",KJE.Default.RateFix30); 
KJE.parameters.set("LOAN_AMOUNT",KJE.Default.MortgageAmt); 
KJE.parameters.set("PREPAY_TYPE",KJE.MortgageLoanCalculation.PREPAY_NONE); 
KJE.parameters.set("PREPAY_STARTS_WITH",1); 
KJE.parameters.set("PREPAY_AMOUNT","0"); 
KJE.parameters.set("TERM",15);

To change any default, simply edit the value in each parameter line. For example, to change the default term from 15 to 30 change 15 to 30 in the TERM line:

Replace 
KJE.parameters.set("TERM",15);

With: 
KJE.parameters.set("TERM",30);

Some parameter values use global defaults that can be modified for all calculators that use them in one location. But these can be changed for a specific calculator simply replacing the default value variable with the actual value you wish to use. For example to change the default loan amount to $100,000 for this calculator you would edit the line:

Replace 
KJE.parameters.set("LOAN_AMOUNT",KJE.Default.MortgageAmt);

With: 
KJE.parameters.set("LOAN_AMOUNT",100000);

Please note that for larger numbers do not include dollars signs or commas. Decimals are acceptable where appropriate. Any changes you make to a Params file is kept intact when you apply an update, these changes will not be overwritten or require you to recreate them after applying an update.

User Comments