title: More then one command in onclick function
body: <p>I have radiobuttons in a form where I added onclick functions, so that the form gets submited as soon I click on a radiobutton.</p>
  
  <pre><code>&lt;td&gt;@Html.RadioButtonFor(m =&gt; m.SelectedTeacher, Model.ListofTeacher[i].ID, new { @onclick = "javascript: this.form.submit();"})&lt;/td&gt;
  </code></pre>
  
  <p>That works fine but now I want to add a second command in the onclick function.</p>
  
  <p>It should change the action "Example" in the form.</p>
  
  <pre><code>using (Html.BeginForm("Example", "Home", new { id = "form" })){}
  </code></pre>
  
  <p>So I tried this</p>
  
  <pre><code>&lt;td&gt;@Html.RadioButtonFor(m =&gt; m.SelectedTeacher, Model.ListofTeacher[i].ID, new { @onclick = "document.getElementById('form').action = 'Delete';
      this.form.submit();" })&lt;/td&gt;
  </code></pre>
  
  <p>but this does not work.</p>
  
  <p>Can someone explain to me how I do it properly?</p>
  
  <p>I don't really have skills in js, so if I lack information please ask!</p>
  
  <p>Cheers.</p>