CustomJS is compulsory¶
And now we get to the interesting part of this section: the calculators for which you must use customJS. These fall in one of three categories:
Calculators that need pre-sets
Calculators with non-standard calculations
Calculators with DID
Marketing calculators 1
Presets¶
This set of calculators are those who simplify the input by gathering multiple variables under one input field. In these examples the user is presented with a drop-down many with a fixed list of options. Upon selection, other variables are internally set to the corresponding values without the user having to deal with technical parameters. All this is accomplished using Value Select and Value Setter customJS variables.
See also
You can learn more about Value Setter in the corresponding section.
For now it’s enough to know it gives the user the option to change the values of multiple variables at the same time via predefined tables.
Here are some examples of calculators that require presets:
Tip
We have created a collection of the most useful Value Setters and Value Selects for you to copy and paste directly in your calculator. Check is out on the Code section of the repository.
Weird formulas¶
These calculators are those for which the calculation requires formulas or procedures that cannot be implemented via the Equations tab on the calculator editor. The simplest example of such a calculator is the Factorial Calculator that requires the input to be integer before it can output the result.
Here are some examples of such calculators. In these cases customJS is what makes the calculations possible.
Multiple personality disorder¶
Some times when you make a calculator you want to add different options and behaviours.This might effectively turn your calculator into several interconnected calculators. To simplify the looks and improve user experience you can create a drop down menu for the user to select one behaviour from the many personalities your calculator now has.
Note
SEO keywords usually dictate that more calculators is better, but that is not always the case. Do your research before commiting your time. Just like the philosopher said: SEO works in mysterious ways
- 1
Marketing calculators are special enough that we dedicated a full section for these special calculators