I found this script to change an image based on the radio button selected:
<FORM action=”” method=post>
<TABLE cellSpacing=0 cellPadding=0 width=429 border=0>
<TBODY>
<TR>
<TD><INPUT onclick=”document.images[‘rx-78-2’].src=(this.value)” type=radio CHECKED value=a.jpg name=rx-78-2> </TD>
<TD><INPUT onclick=”document.images[‘rx-78-2’].src=(this.value)” type=radio value=b.jpg name=rx-78-2> </TD></TR>
<TR vAlign=top>
<TD>
1</TD>
<TD>
2</TD></TR></TBODY></TABLE></FORM></DIV>
<DIV align=center>
<TABLE cellSpacing=0 cellPadding=0 width=429 border=0>
<TBODY>
<TR>
<TD>
<DIV align=center><IMG height=400 alt=”” src=”us-add.php” width=400 border=0 name=rx-78-2></DIV></TD></TR></TBODY></TABLE>
How do I use radio buttons to display different sets of form fields within a larger form on a page? Instead of switching images, I want to switch HTML code.