Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery dialog with file upload using ajaxSubmit not posting after failing validation (IE caching issue?)
    primarykey
    data
    text
    <p>This only happens in IE. Chrome and Firefox work fine. I am using ASP.NET MVC 3 and jQuery.</p> <p>I have a jQuery dialog with a form that has a file upload, so I'm using ajaxSubmit to submit the form to the server. I am not using any client-side validation, but I AM using server-side validation on my model.</p> <p>I am running the code in debug mode in Visual Studio with a breakpoint on the POST handler for this controller action. I pull up the dialog and fill out the form in a way that I know is invalid. When I click Save, I first get the alert('save'), then I get alert('beforeSubmit'), then my ajaxSubmit runs and hits the breakpoint on the "server". Validation fails and returns the new form with my red validation messages visible. Somewhere in there I get alert('success') and alert('complete'). All is well. Then I fix the data on the form to be valid and click Save again.</p> <p>This time I get alert('save') and that's it. Nothing else. No other alerts, no breakpoint, nothing. Fiddler doesn't even register a POST. Again, this only happens in IE. Chrome and Firefox work fine.</p> <p>Please help.</p> <pre><code>function save() { alert('save'); $('#household-member-form').ajaxSubmit({ url: '/Wizard/HouseholdMember', target: '#dialog-household-income', type: 'POST', cache: false, success: function () { alert('success'); }, error: function () { alert('error'); }, beforeSubmit: function () { alert('beforeSubmit'); }, complete: function () { alert('complete'); }, async: false }); } </code></pre> <p>EDIT: I also have this in my controller action:</p> <p>HttpContext.Response.Cache.SetNoStore(); HttpContext.Response.Cache.SetCacheability(HttpCacheability.NoCache);</p> <p>EDIT 2: Also, any feedback on how I could re-word this question to get a better response would be appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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