title: Reloading partial with observe_field using Ajax triggers multiple events
body: <p>I have a form with 3 dropdowns - A, B, and C. When A changes, B should be updated with a new list of options and C should be cleared. When B changes, C should be updated with a new list of options.</p>
  
  <p>I have partials for A, B, and C, and A and B both include the <code>observe_field</code> call to watch itself.</p>
  
  <p>Every time A changes, B gets reloaded and a new observer is added. That means every time B changes, N+1 requests to reload C are triggered (where N is the number of times A has changed).</p>
  
  <p>I've tried moving the <code>observe_field</code> call out of the partial that replaces the dropdown for B (placing it instead in the partial for A), but after the first change to A, B is no longer triggering events.</p>
  
  <p>I've also tried adding a <code>$('b').stopObserving();</code> call to the <code>:before</code> of the observer on B, but that has the same effect - after the first change to A, events stop triggering on B.</p>
  
  <p>Is there a way to make this work?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Here is the Javascript that is generated by the <code>observe_field</code> calls:</p>
  
  <pre><code>new Form.Element.EventObserver('a', function(element, value) {
    $('b_loading_indicator').show();
    new Ajax.Updater('b',
      'http://localhost:3000/foos/b_control', {
        asynchronous: true,
        evalScripts: true,
        onComplete: function(request) { $('b_loading_indicator').hide(); },
        parameters: 'a_id=' + encodeURIComponent(value) + '&amp;object_name=foo' + '&amp;authenticity_token=' + encodeURIComponent('kH/TmOfvSKeNLxO4N0gxtqV0niNfAUlJ3guk6KAvPig=')
      });
  });
  
  new Form.Element.EventObserver('b', function(element, value) {
    $('c_loading_indicator').show();
    new Ajax.Updater('c', 
      'http://localhost:3000/foos/c_control', {
        asynchronous: true,
        evalScripts: true,
        onComplete: function(request) { $('c_loading_indicator').hide(); },
        parameters: 'a_id=' + encodeURIComponent($('a').value) + '&amp;b_id=' + encodeURIComponent(value) + '&amp;object_name=foo' + '&amp;authenticity_token=' + encodeURIComponent('kH/TmOfvSKeNLxO4N0gxtqV0niNfAUlJ3guk6KAvPig=')
    });
  });
  </code></pre>