Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery 1.6 $('form').validate() not working in IE7 & IE8
    primarykey
    data
    text
    <p><strong>UPDATE</strong>: I've created a new MVC 3 project with Razor HTML 5, then I've updated the project with NuGet at JQuery 1.6 and the validation plugin doesn't work any more, it does a post back every time and returns the error message from server. I think the validation plugin is broken with <strong>JQuery 1.6</strong></p> <p>I have a MVC 3 app that uses Jquery UI dialog (loaded from a partial view that contains a form) in order to submit information over ajax to the server. I want to trigger the validation of my form on the client side before I do the ajax post. On Firefox and IE9 works fine, in IE7 &amp; IE8 the form.validate() always returns true.</p> <p>Here is the js code attached to my submit button:</p> <pre><code> var wizard = $("#wizard"); //div that holds the modal dialog var myform = $("#wizard form"); var submitFunction = function (e) { e.preventDefault(); //no postback myform.validate(); if (myform.valid()) { $(this).attr("disabled", "disabled"); submited = true; $.post( "SuperAdmin/CreateEditController", $(this).serialize(), function (data) { if (data.Success) { wizard.dialog('destroy'); } else { wizard.html(data.Html); } }, "json" ); //end json post } }; myform.submit(submitFunction); </code></pre> <p>I am using the following includes:</p> <pre><code>&lt;script src="@Url.Content("~/Scripts/jquery-1.6.min.js")" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")" type="text/javascript"&gt;&lt;/script&gt; </code></pre> <p>The JQuery Validation plugin was upgraded with NuGet at version 1.8.0 and JQuery library to 1.6.</p> <p><strong>Update</strong>: I've tested the code generated with scaffolding default template and it does the same thing, no client side validation. Maybe JQuery 1.6 is not compatible with the Razor scaffolding template ??</p>
    singulars
    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.
 

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