MVC VS2012 jquery.validate.js error in IE: unable to get call to undefined property or null reference (line 1234)

I get this error only in IE on my MVC site:

SCRIPT5007: Unable to get invocation of undefined property or null reference jquery.validate.js, line 1234 character 5

I looked back at the answers a bit and cannot find a solution. Chrome works fine. When I indicated the exact error message to Google, they brought me here: the script package does not work , but the answers there did not help me.

I tried updating jQuery and jQuery validation plugins using Visual Studio NuGet Package Manager. I upgraded jQuery to version 2.0.3 and jQuery Validation 1.11.1. I think I used to have jQuery 1.9.x. It had no effect.

I believe my packages are standard:

bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include( "~/Scripts/jquery-ui-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( "~/Scripts/jquery.unobtrusive*", "~/Scripts/jquery.validate*")); 

and at the end of my layout page, these are my scripts. Render calls:

  @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jqueryui") @Scripts.Render("~/bundles/jqueryval") @RenderSection("Scripts", false) </body> </html> 

any help is appreciated.

+7
jquery-validate asp.net-mvc-4
source share
1 answer

I installed Bootstrap MVC4 via NuGet when the exact error occurred with my application. The last install of Bootstrap MVC4 removes jquery-1.8.2 * and installs jquery-1.9.1 * as dependencies. jquery.validate did not seem to play well with jquery-1.9.1. https://github.com/jzaefferer/jquery-validation states that they do not solve the problems associated with IE-compatibility (for obvious reasons). The problem is that I was running IE10 - compatibility mode, and I was still getting the error. I added all the latest versions of all jquery files to my project, deleted the old ones from the project, and managed in IE!

+4
source share

All Articles