I have a simple form created using Ajax.BeginForm:
<% using (Ajax.BeginForm(\"Update\", \"Description\", new { id = Model.Id
Unfortunately triggering the onsubmit or submit events wont work in all browsers.
Also, if you trigger('submit') in Chrome or IE, it causes the entire page to be posted rather than doing an AJAX behavior.
What works for all browsers is removing the onsubmit event behavior and just calling submit() on the form itself.
<% using (Ajax.BeginForm("Update", "Description", new { id = Model.Id },
new AjaxOptions
{
UpdateTargetId = "DescriptionDiv",
HttpMethod = "post"
}, new { id = "ajaxForm" } )) {%>
Description:
<%= Html.TextBox("Description", Model.Description) %>
Save
<% } %>
Also, the link doesn't have to be contained within the form in order for this to work.