title: TypeError: object is not a function, when it is!
body: <p>I am having trouble with some Ajax functionality.</p>
  
  <p>I have a single dropdown that needs to update a record when the option changes. Here is a snippet of the Javascript:</p>
  
  <pre><code>function changeResponsibleParty(selectObj, targetDiv){
      var idx = selectObj.selectedIndex;
      var which = selectObj.options[idx].value;
      target = document.getElementById(targetDiv);
      target.value = which;
      document.forms["changeResponsibleParty"].submit();
  }
  </code></pre>
  
  <p>And the HTML:</p>
  
  <pre><code>&lt;form name="changeResponsibleParty" action="javascript:changeResponsiblePartyAjax('project_todos');" method="post" style="display:inline;"&gt;
  
  &lt;input type="hidden" name="todo_id" id="todo_id_15" value="15" /&gt;
  &lt;input type="hidden" name="project_id" id="project_id_15" value="2" /&gt;
  &lt;input type="hidden" name="user_id" id="user_id_15" value="" /&gt;
  
  &lt;select name="user_id_pick" id="user_id_pick_15" onchange="changeResponsibleParty(this, 'user_id_15');" style="border:0;"&gt;
  
  &lt;option value="0"&gt;Anyone&lt;/option&gt;
  &lt;option value="1" selected="selected"&gt;Allen McCabe&lt;/option&gt;
  &lt;option value="2"&gt;Thomas Martinez&lt;/option&gt;
  &lt;/select&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I am using the function to update a hidden input element because for some reason, the  tag was posting 1 regardless of which option I chose (1 is my user_id, which I set as selected if the database record value is 1.</p>
  
  <p>Can anyone see what is wrong here?</p>