title: Attaching onChange event to select list in Rails
body: <p>I want to add a simple onChange event to a select list I have in Rails. How do I do this? </p>
  
  <p>This is the select box code:</p>
  
  <pre><code>= f.select(:question_type_id, QuestionType.all.collect {|qt| [ qt.name, qt.id ]}, { :include_blank =&gt; "Please Select a Question Type" })
  </code></pre>
  
  <p>The onChange event is supposed to call a function, fillAnswerNumber(), which takes the currently selected value and adds a bunch of options to another select list based on the result.</p>
  
  <p>edit: I realised that i needed an onChange event actually...</p>