Today is . Page created 06/09/06

Percentage Increase/Decrease Percentage Calculator Percentage Calculator
Increase/Decrease From: To:
Percent of Gain/Loss:

C alculate the percentage of increase/decrease between two units. A simple, effective script. Just enter your two (2) numbers ("Not" the % character or it "Won't Work). You will get the error of NaN%. In other words, see the below examples:

Right Way

Increase/Decrease From: To:
Percent of Gain/Loss:

Wrong Way

Increase/Decrease From: To:
Percent of Gain/Loss:

We have tested the code in IE6.0, Firefox1.5.0.3, Opera8.54, Netscape8.1 and AOL Explorer1.2. This script worked well in all platforms with no variations observed.

D epending on your knowledge of HTML and javascripts, this is an easy three (3) part (No reconfigurations) copy and paste code that goes in both the <HEAD> and <BODY> sections of your document. It also makes use of an external .js script you need to save and upload into your directory.

Step One Is to copy and paste a section of code into a notepad, save as gainCalc.js and upload the external .js script into your directory.

Warning Logo     Note Of Importance:     If you are not sure of howto make the external .js file and make use of it within your document, grab the below link and it is fully explained.
.js File Howto ]

Step Two Once you got all the above (Step One) taken care of, now you need to paste a snipplet of code into the <HEAD> section to call the external.js file.

<script type="text/javascript" src="gainCalc.js"></script>

D epending on where you have uploaded the external .js file, you may need to change the path of the above file to reflect the directory where it resides. This is also covered in the above link .js File Howto ]

Step Three Is to paste a section of code anywhere in the <BODY> section you want the effect to be seen.

W e hope our tutorial was easy to follow and we covered everything in detail. If you would like to add this effect into your pages, grab the respective below link and you are there. If you have any problems with this or anything else, feel free to consult our FAQ ] and if you can't find the answer there, contact us ].
Get Code Here ]   [ Rate This Page ]