jQuery Validation not working in IE7 + IE8

后端 未结 6 1414
有刺的猬
有刺的猬 2020-11-28 08:56

I\'m trying to use the jQuery Validation plugin on a form on my website. The form works in FF, Chrome, Opera and Safari. It has yet to work in IE7 or IE8.

Below is a

相关标签:
6条回答
  • 2020-11-28 09:03

    For what it's worth, I had to upgrade to latest JQuery (1.8.2 at this time) and Validate (1.10) to get around this issue.

    0 讨论(0)
  • 2020-11-28 09:04

    I had issues with jquery.validate.js in IE7/IE8. After debugging I noticed the following line was causing the issue (ln 436 in version 1.7):

    return $([]).add(this.currentForm.elements)
                .filter(":input")
    

    Replace these two lines with something like:

    return $(':input', this.currentForm)
    

    That did the trick for me.

    0 讨论(0)
  • 2020-11-28 09:15

    When you create a new ASP.NET MVC 3 Project in Visual studio, your script folder will by default contain among others:

    jquery-1.5.1.min.js 
    jquery.validate.min.js (which is version 1.8.0)
    

    One of the first things you might want to do is update the jquery version to the latest version, which today is version 1.7.1

    After doing this, your client side validation will stop working in Internet Explorer 7 and Internet Explorer 8.

    This is because the jquery.validate version is not compatible with jquery versions > 1.6. The solutions is simple, you need to update your version of jquery.validate as well.

    You can find the current version 1.9 from Microsoft’s CDN or the latest version from GitHub here:

    Microsoft Ajax CDN: http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js

    GitHub Jquery Validation: https://github.com/jzaefferer/jquery-validation/downloads

    Remember that you can always find the latest javascript library in Microsofts CDN, see the complete list of available libraries here: http://www.asp.net/ajaxlibrary/cdn.ashx

    This information is from my blog post about this problem

    0 讨论(0)
  • 2020-11-28 09:16

    I think you either need to move back to an earlier version of jquery (1.5.2) or use the newer version of the validation plugin 1.8.0.1.

    0 讨论(0)
  • 2020-11-28 09:16

    I just had this issue but the problem was not that I needed the latest version of jquery--it was the latest version of jquery that caused the issue. Jquery 2.x does not support IE at this time, so make sure you're using 1.8+ but less than 2.0.

    0 讨论(0)
  • 2020-11-28 09:23

    I had the same problem on Sage CRM using jqueryui autocomplete getting error "script3: member not found. jquery-1.8.2.min.js, line 2 character 32075" only in IE (version 10). This error was tied up in the page mode: IE was forcing the site into IE 7 standard mode.

    Its a nasty hack, but it works well. Put this at the start of the page. Cost me an hour tonight messing about with this, hope this helps someone else.

    <!DOCTYPE HTML>
    <meta http-equiv="x-ua-compatible" content="IE=Edge">
    
    0 讨论(0)
提交回复
热议问题