Note that there are some explanatory texts on larger screens.

plurals
  1. POMVC3 Ajax.begin form works in chrome and IE, but not firefox?
    text
    copied!<p>I am working on an MVC3 project, and am at my wits end trying to sort this one out. It's probably something super simple I'm overlooking, but I just don't see it right now. The problem is when I click the submit button in firefox, literally nothing happens. There are no errors in the console, it never hits my controller, just straight up nothing. Watching the I watch the XHR requests in chrome, and it does exactly what it's supposed to. Watching the XHR requests in firebug, and nothing. </p> <p>Here is the code.. View. -- This is just the partial view, In the head of the full view template file, I did include jquery.ajax-unobtrusive.js, Microsoft.ajax.js, and Microsoft.mvcajx.js...In that order</p> <pre><code>@using Infragistics.Web.Mvc @model FuelPortal.Models.ViewModels.UserMaintenanceViewModel @*changed this div and ajax update from wrapperData to wrapperData because having it as wrapperData was screwing up the JS on user submit, it had two of the same id's...*@ &lt;style type="text/css"&gt; input[type=text] { margin-bottom: 10px; } .disabled { background-color: #CECECE !important; background-image: url('') !important; } &lt;/style&gt; &lt;script src="../../Scripts/jquery.unobtrusive-ajax.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;div id="wrapperData2"&gt; &lt;!-- jared's table thingymabobber starts here yo --&gt; @if (Model != null) { &lt;div class='frmBG'&gt; &lt;table width='100%' style='margin-top: 10px'&gt; @using (Ajax.BeginForm("DetailUser", new AjaxOptions { UpdateTargetId = "wrapperData2", InsertionMode = InsertionMode.Replace, HttpMethod = "POST" })) { &lt;tr&gt; &lt;td&gt;&lt;b&gt;First Name:&lt;/b&gt;&lt;/td&gt; &lt;td&gt;@Html.TextBoxFor(mbox =&gt; mbox.User.firstName)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;b&gt;Last Name:&lt;/b&gt;&lt;/td&gt; &lt;td&gt;@Html.TextBoxFor(mbox =&gt; mbox.User.lastName)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;b&gt;Email:&lt;/b&gt;&lt;/td&gt; &lt;td&gt;@Html.TextBoxFor(mbox =&gt; mbox.User.email)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;b&gt;Username:&lt;/b&gt;&lt;/td&gt; &lt;td&gt;@Html.TextBoxFor(mbox =&gt; mbox.User.userName, new {@readonly="true", @class="disabled"})&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;b&gt;Phone:&lt;/b&gt;&lt;/td&gt; &lt;td&gt;@Html.TextBoxFor(mbox =&gt; mbox.User.phone)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;b&gt;Account Expiration Date:&lt;/b&gt;&lt;/td&gt; &lt;td&gt;@Html.TextBoxFor(mbox =&gt; mbox.User.expireDate)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;@Html.HiddenFor(mbox =&gt; mbox.User.LoginAccountId)&lt;/td&gt; &lt;td&gt;&lt;input type="submit" value='Save' /&gt;&lt;/td&gt; &lt;/tr&gt; } &lt;/table&gt; &lt;/div&gt; } &lt;/div&gt; </code></pre> <p>Controller action -- the first action is what executed when the partial view is loaded, the HTTP POST overload is executed when the partial view's form is submitted. </p> <pre><code> //view details public ActionResult DetailUser(int id) { UserMaintenanceViewModel model = new UserMaintenanceViewModel(); model = repository.getUserById(Session["UserId"].ToString(), id); return PartialView("_ViewUserDetail", model); } [HttpPost] public ActionResult DetailUser(int id, UserMaintenanceViewModel model) { var test = model.User.LoginAccountId; var test2 = model.User.firstName; var result = repository.updateUser(model.User); return PartialView("_ViewUserDetail", model); } </code></pre> <p>Any help is greatly appreciated, cheers everyone!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload