Show/Hide Div Based on Radio Selection - Prototype


I have 3 divs that contain radio with labels and beneath each radio button I would like to show/hide a form based on whether the radio is selected or not.

Code idea:

<div id=“radio1”>
<label><input type=“radio” />Label Text</label>
<div id=“form1”></div>

<div id=“radio2”>
<label><input type=“radio” />Label Text</label>
<div id=“form2”></div>

<div id=“radio3”>
<label><input type=“radio” />Label Text</label>
<div id=“form3”></div>

So if the radio1 input is selected this would show form1. Selecting radio2 input would hide any other forms (form1, form3) and show form 2 etc.

Using prototype does anyone have any basic idea or suggestion on the best way to accomplish this. Any suggested scripts or links would be greatly appreciated. I am a newbie to prototype and having a hard time grasping the concept or finding anything helpful online. In theory I wouldn’t think this would be too complicated but thanks in advance for any help.

jQuery seems to be more popular around here than Prototype, however, we can help in some way.

While you’re waiting to luck across anyone here who’s willing to help with Prototype, we have an article on Painless JavaScript Using Prototype and you may want to become involved with the user community for Prototype at