title: Change a form's action dynamically on thymeleaf
body: <p>I currently have a select dropdown box which shows one of several input file browsers (each allows only one of ".txt", ".cvs" and so on) according to the selected option. I want to change the form's action depending on the selected option so I can handle each case in a different method on the controller's side.</p>
  
  <p>This example works when not using thymeleaf:</p>
  
  <pre><code>$("#myselect").change(function() {
      if($(this).val() == "option1"){
          $("#form").attr("action", "/processopt1");
      }
  });
  </code></pre>
  
  <p>I am trying the following for thymeleaf without success:</p>
  
  <pre><code>$("#myselect").change(function() {
      if($(this).val() == "option1"){
          $("#form").attr("th:action", "@{/processopt1}");
      }
  });
  </code></pre>
  
  <p>Thanks in advance.</p>