Forum Moderators: open
I'm very new to scripting and essentially I want to have a form that does a simple calculation based on the value entered in a text field times but the value selected in a radio. I want it to dynamically update the value in the second text field when the radio button is selected without having to click a button. I've tried the following but it doesn't work. Any advice most welcome.
<FORM>
<INPUT TYPE="TEXT" NAME="number1"> x 2<INPUT TYPE="radio" NAME="number2" value="2" onClick="this.form.answer.value = (this.form.number1.value - 0) * (this.form.number2.value - 0)">
3<INPUT TYPE="radio" NAME="number2" value="3" onClick="this.form.answer.value = (this.form.number1.value - 0) * (this.form.number3.value - 0)">
<INPUT TYPE="TEXT" NAME="answer">
</FORM>