title: trigger button to be clicked after option from drop down is selected
body: <p>I have the following problem:</p>
  
  <p>When an option from the dropdown list is selected it should be added to the searchbox. This works. But now I want the "GO" button to be clicked when automatically as soon as this has happenned. With the code I have so far, I'm trying to use the  </p>
  
  <pre><code>  $('input[name="go"]').trigger("click");
  </code></pre>
  
  <p>part to achieve this. The problem however, is that this last event is triggered as soon as the dropdown box is clicked (and thus before an option can be selected). I tried many things, but I'm not very experienced with jquery.
  (btw: I'm using a pre-existing search field and button)</p>
  
  <p>This is the javascript/jquery code:</p>
  
  <pre><code>    $(document).ready(function(){
  
      $('select[name="Articlecategories"]').bind('click', function() {
  
  
  
       $('select[name="Articlecategories"]').change(function () { 
             var str = "";
             $('select[name="Articlecategories"] option:selected').each(function () {
                  str += $(this).text() + " ";
                   });
              $('input[name="searchfield"]').val(str);
       })
  
      .change();
  
      $('input[name="searchfield"]').change(function () { 
      $('input[name="go"]').trigger("click");
       }) 
      .change();
  
      });
  
  
      });
  </code></pre>
  
  <p>And this the html:</p>
  
  <pre><code>  &lt;select name="Artikelcategorien"  &gt;
      &lt;option selected="selected" disabled&gt;select an option&lt;/option&gt;
      &lt;option &gt;Candy&lt;/option&gt;
      &lt;option&gt;Taffy&lt;/option&gt;
      &lt;option&gt;Caramel&lt;/option&gt;
      &lt;option&gt;Fudge&lt;/option&gt;
      &lt;option&gt;Cookie&lt;/option&gt;
    &lt;/select&gt;
  
  &lt;input type="text" name="searchfield" value="" &gt;
      &lt;input type="submit" name="go" value="GO" &gt;
  </code></pre>