title: Javascript - onchange within <option>
body: <p>I have a relatively simple form which asks a variety of questions. One of those questions is answered via a Select Box. What I would like to do is if the person selects a particular option, they are prompted for more information.</p>
  
  <p>With the help of a few online tutorials, I've managed to get the Javascript to display a hidden div just fine. My problem is I can't seem to localise the event to the Option tag, only the Select tag which is no use really.</p>
  
  <p>At the moment the code looks like (code simplified to aid clarity!): </p>
  
  <pre><code>&lt;select id="transfer_reason" name="transfer_reason onChange="javascript:showDiv('otherdetail');"&gt;
  &lt;option value="x"&gt;Reason 1&lt;/option&gt;
  &lt;option value="y"&gt;Reason 2&lt;/option&gt;
  &lt;option value="other"&gt;Other Reason&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;div id="otherdetail" style="display: none;"&gt;More Detail Here Please&lt;/div&gt;
  </code></pre>
  
  <p>What I would like is if they choose "Other Reason" it then displays the div. Not sure how I achieve this if onChange can't be used with the Option tag!</p>
  
  <p>Any assistance much appreciated :)</p>
  
  <p>Note: Complete beginner when it comes to Javascript, I apologise if this is stupidly simple to achieve!</p>