title: Uncaught TypeError: Cannot call method 'submit' of null
body: <p><a href="http://imgur.com/DdP1Ehn" rel="nofollow">Here is a picture of the error.</a> This error appeard after I made some changed to my project. When you press the button it's supposed to go to a controller for logging a user of the website. I remade my layout to bootstrap and changed/deleted alot of the CSS belonging to the site. This might be related but not sure how. Here is the code for the button:</p>
  
  <pre><code>@if (Request.IsAuthenticated) {
      &lt;text&gt;
          Hello, @Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Manage" })!
          @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" })) {
              @Html.AntiForgeryToken()
              &lt;a href="javascript:document.getElementById('logoutForm').submit()"&gt;Log off&lt;/a&gt;
          }
      &lt;/text&gt;
  } else {
      &lt;ul&gt;
          &lt;li&gt;@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })&lt;/li&gt;
          &lt;li&gt;@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })&lt;/li&gt;
      &lt;/ul&gt;
  }
  </code></pre>
  
  <p>Does anyone know why this might be occurring?</p>