title: drupal > views > exposed filter > submit on change
body: <p>I've got a view with a single exposed filter (a select). It's using ajax to re-populate when the user clicks "Apply". I'd like them not to have to click that and just re-populate when the select is changed. I'm assuming I'm going to need some JS more or less like this (though this doesn't quite seem to be working):</p>
  
  <pre><code>$('#edit-tid').change(function(){
    $('#views-exposed-form-MYVIEW-page-1').submit();
  });
  </code></pre>
  
  <p>First, I would think that would do it, but it's not getting submitted. Anyone know why?</p>
  
  <p>Second, what's the best way to inject that code? I'm thinking of using the View footer because it's easy, but any other better ideas?</p>
  
  <p>UPDATE: The above code <em>is</em> working (injected via the views footer), but only the first time. I guess the select is getting overwritten by the ajax call, but the behavior isn't getting reattached (or something). Hmm...</p>
  
  <p>UPDATE #2: For simplicity's sake, I'm gonna ditch the ajax.</p>