When you have multiple radio form elements with the same name you have to reference them as an array item. So the theywould be:
You will have to see which one is selected by using an if statement and the "checked" property like so:
Since you only have two you can create your if like the above.
I would also recommend that you not use the onClick in the submit button, but use the onSubmit event in the form tag like so:
<form ... onSubmit="sendMail(this.form)">
If you are going to some validating before the form is sent then you will want to have your form tag like so:
<form ... onSubmit="return sendMail(this.form)">
Then in your validate script you would return false to keep the form from submitting and true to have it submit. I would also not recommend that you use the same variable names in your script as your form elements. I have found this to cause problems and also confusion. Good Luck.
Last edited by requestcode; 03-07-2005 at 06:38 PM..