Click to See Complete Forum and Search --> : Syncro radio button selection


Carlo..
11-29-2002, 05:55 AM
Hello i need a javascript help for a radio button.
On my page i have on the top and on the bottom of my page the same radio button question eg. yes or no.

For example when a person makes the selection "YES" on the bottom radio button, so the radio button on the top should also change to "Yes".

Its equal where the radio button will be selected.
The top radio button or them of the bottom.

Which Javascript i need for this syncro selection?
Thanks a lot.

Bye
Carlo

gil davis
11-29-2002, 08:17 AM
<form name="f1">
<input type="radio" name="r1" value="yes"
onClick="document.f2.r1.checked=this.checked">
<input type="radio" name="r2" value="no"
onClick="document.f2.r2.checked=this.checked">
</form>
...
<form name="f2">
<input type="radio" name="r1" value="yes"
onClick="document.f1.r1.checked=this.checked">
<input type="radio" name="r2" value="no"
onClick="document.f1.r2.checked=this.checked">
</form>