title: jquery change form action
body: <p>There are definitely questions out there to help on this, but I can't seem to get mine working...</p>
  
  <p>Trying to base my form action off of a  menu.  Obviously have something wrong and would appreciate any thoughts!</p>
  
  <pre><code>$("#role").change(function() {
      if ($(this).val() == "audience");
      var action = "./";
      } else {
      var action = "http://google.com";
  $("#landing_form").attr("action", action);
  });
  
    &lt;form action="./" method="post" id="landing_form"&gt;
      &lt;select name="role" id="role"&gt;
        &lt;option value="audience"&gt;Audience&lt;/option&gt;
        &lt;option value="presenter"&gt;Presenter&lt;/option&gt;
        &lt;option value="moderator"&gt;Moderator&lt;/option&gt;
      &lt;/select&gt;
  </code></pre>