If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

- use DOCTYPE and try to validate your html with http://validator.w3.org/
- don't capitalise tag names (e.g. form, not Form)
- use JS error console to spot some basic mistakes, such as having calcCost undefined, since it was in a conditional statement

Other that that, you were close. Did you write that JS by yourself? The main problem was conditionally defined function. You couldn't reference it, because at the time of execution, there were no forms or radio buttons yet - one of the solutions could be to put the <script> at the end of the <body> tag.

Another problem is with nform (JS is case-sensitive, so nForm is something else):
nForm.nEmp returns an HTMLCollection of all the 3 inputs, so you can't get a value of that. It's better to use the well-commented approach with for loop. Then i just took the value of the checked input and multiplied it by 20. I understand that is what you want.