CloudyKooper
CloudyKooper

Reputation: 717

Why am I getting a "Unable to get property 'call' of undefined or null reference" error?

when I click on a dropdown list on the page I’m getting the error message:

“JavaScript runtime error: Unable to get property 'call' of undefined or null reference”

I tried following some solutions on StackOverflow mainly installing the package via:

PM> Install-Package jQuery.Validation -Version 1.11.0… from this site:

https://www.nuget.org/packages/jQuery.Validation/1.11.0

It seemed to install successfully as per the console shot below:

PM> Install-Package jQuery.Validation -Version 1.11.0 Attempting to resolve dependency 'jQuery (≥ 1.4.4)'. Successfully installed 'jQuery.Validation 1.11.0'.

Install failed. Rolling back... Install-Package : Updating 'jQuery 1.8.3' to 'jQuery 1.4.4' failed. Unable to find versions of 'Microsoft.jQuery.Unobtrusive.Ajax, Microsoft.jQuery.Unobtrusive.Validation' that are compatible with 'jQuery 1.4.4'. At line:1 char:1 + Install-Package jQuery.Validation -Version 1.11.0 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

I’m still getting the error message so I’m wondering what my next move should be. Here’s a list of the scripts that I’m referencing on the page:

  jquery.validate.min.js
 jquery.validate.unobtrusive.min.js
  jquery.dataTables.js
 MicrosoftAjax.js
 MicrosoftMvcValidation.js
 GradeValidation.js
 jquery-ui.css
 jquery-1.10.2.js
 jquery-ui.js

Why am I still getting the error message after installing the validation package?

Upvotes: 0

Views: 9259

Answers (1)

iCollect.it Ltd
iCollect.it Ltd

Reputation: 93561

If the order listed is your inclusion order, you are referencing many jQuery components, before you include jQuery!

Change inclusion order to include jQuery first:

 jquery-ui.css
 jquery-1.10.2.js
 jquery-ui.js
 jquery.validate.min.js
 jquery.validate.unobtrusive.min.js
 jquery.dataTables.js
 MicrosoftAjax.js
 MicrosoftMvcValidation.js
 GradeValidation.js

Upvotes: 1

Related Questions