Click to See Complete Forum and Search --> : Paycheck Calculator help


beadcraze
01-25-2003, 09:34 PM
Hello all,

I am new here, I just have the question for you all to see if any one knows how to do this on the Paycheck Calculator script for HTML. I would like to add in the script the four features:

FICA-OASDI
Federal
FICA-HI
State CT

They are all taxes that comes out of my paycheck. I would like to be able to add them into the script and have them computed into the Net pay. I got the simple script from JavaScript site called, "Paycheck Calculator" It only has one "tax rate", I need to add the others to round off the paycheck as it should. Is there any way that anyone can help in doing this for me? I love the simplicity of this script to figure out the pay I should be getting each week. Thanks so much for all your great help in advance.

Laurie
l_edwards@snet.net

khalidali63
01-25-2003, 09:54 PM
It should be prety much same as the one you refred you already have,
Just add the additional text fields

something like this.

<input type="Text" name="text1">

as many as you want with appropriate name attributes.

second you need to know the values for all types of the taxes.
once you have that get a value form the text field like this.

var value = document.formName.textFileName.value;
var textVal = value * textRate;

the above pattern will prety much stay the same for all the calcualtions except the attribute name and its values.

cheers
Khalid