Note that there are some explanatory texts on larger screens.

plurals
  1. POShow/hide drop down if a certain selection is made in previous drop down
    text
    copied!<p>I have a form. I want to disable or enable a drop down depending on a radio button selection. I need to do this several times in the form. I am new to Javascript so I dont really know where to start. this is a part of the form:</p> <pre><code>&lt;p id="hospitalorientation"&gt;&lt;label&gt;Hospital Orientation:&lt;/label&gt; &lt;div id='buttons'&gt; &lt;label&gt;&lt;input type="radio" name="hospital" /&gt; Not Complete &lt;/label&gt; &lt;label&gt;&lt;input type="radio" name="hospital" /&gt; Complete &lt;/label&gt; &lt;/div&gt; &lt;div id="list1" style="display: none;"&gt; &lt;label&gt;Month Complete: &lt;select&gt; &lt;option&gt;January&lt;/option&gt; &lt;option&gt;February&lt;/option&gt; &lt;option&gt;March&lt;/option&gt; &lt;option&gt;April&lt;/option&gt; &lt;option&gt;May&lt;/option&gt; &lt;option&gt;June&lt;/option&gt; &lt;option&gt;July&lt;/option&gt; &lt;option&gt;August&lt;/option&gt; &lt;option&gt;September&lt;/option&gt; &lt;option&gt;October&lt;/option&gt; &lt;option&gt;November&lt;/option&gt; &lt;option&gt;December&lt;/option&gt; &lt;/select&gt; &lt;/label&gt; &lt;/div&gt; </code></pre> <p>and then i have basically several replicas of this in the form..</p> <pre><code>&lt;p id="ppd"&gt;&lt;label&gt;PPD:&lt;/label&gt; &lt;div id='buttons'&gt; &lt;label&gt;&lt;input type="radio" name="ppd" /&gt; Not Complete &lt;/label&gt; &lt;label&gt;&lt;input type="radio" name="ppd" /&gt; Complete &lt;/label&gt; &lt;/div&gt; &lt;div id="list2" style="display: none;"&gt; &lt;label&gt;Month Complete: &lt;select&gt; &lt;option&gt;January&lt;/option&gt; &lt;option&gt;February&lt;/option&gt; &lt;option&gt;March&lt;/option&gt; &lt;option&gt;April&lt;/option&gt; &lt;option&gt;May&lt;/option&gt; &lt;option&gt;June&lt;/option&gt; &lt;option&gt;July&lt;/option&gt; &lt;option&gt;August&lt;/option&gt; &lt;option&gt;September&lt;/option&gt; &lt;option&gt;October&lt;/option&gt; &lt;option&gt;November&lt;/option&gt; &lt;option&gt;December&lt;/option&gt; &lt;/select&gt; </code></pre> <p> </p> <p>And now I dont really know where to go from there.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload