Sascha wrote:
hello ng
i have a group of 6 radiobuttons with different values.
when i check a radiobutton, i have to calculate something
with the value of the new ckecked radiobutton.
can please someone tell me which action i should use, to get
the correct value? i tried onFocus and onClick, but then i
get the value of the radiobutton which before was checked.
right now, i use onmouseout.
any ideas?
greets
sascha
It's generally easier to post what you've got - and which isn't working
- to give people a starting point. Since it's a CLICK event that's
triggering the recalculation, Radio.onclick is the correct event
handler to wire up. You can pass that button's value to a function with
this.value and use that in your calculation.
<input type="radio"....onclick="return calc(this.value)" />
If there are other parameters to the calculation that change as well,
you'll need to read the value of the currently checked radio as well,
requiring a different technique. Again, the nuts & bolts description of
what your're doing is invaluable.