I had been using the super jQuery Validator plugin in one of my projects. And everything was working fine, except in IE8. Isnt that typical of IE? Anyways, the problem was that I was using the validator plugin quite heavily and one of the forms simply refused to work in IE8. I did not try in IE6 but I would assume the problem would be the same in IE6 as well. I tried all kinds of things, like validating my Javascript code and going over it line by line and making sure there are no bugs that I missed.
None of that worked. After about a million WTF’s and approx. 6.5 hours of time wasted, I found this out. http://www.seodenver.com/jquery-validator-annoyances/
The solution is to use jquery.validator.min.js instead of jquery.validator.pack.js (which I was using). As soon as I changed the .pack.js file to .min.js file, everything started working. I would think its something to do with the the encoding of the JS etc. But I am glad I found the solution, finally.
I just wanted to blog about it so someone else can save some time with this little tip.
#1 by mark on October 30, 2009 - 5:02 pm
Quote
i can vouch for this, ie8 sucks!
#2 by Anuj Gakhar on October 30, 2009 - 5:04 pm
Quote
sure it does Mark, someone could have saved days worth of time spent if it didnt
#3 by Nick on October 30, 2009 - 5:23 pm
Quote
I spent a few hours yesterday troubleshooting for IE6 on the same issue, yes 6, and after switching pack with min, everything worked.
#4 by Anuj Gakhar on October 30, 2009 - 5:59 pm
Quote
I know Nick. we should all send an invoice to IE team
#5 by Gary Fenton on October 30, 2009 - 7:14 pm
Quote
You should try Validity instead. It has much better features and works on IE8 and all other popular browsers. It’s really flexible and lets you change how the validation errors are displayed with 1 line of code, or roll your own.
http://validity.thatscaptaintoyou.com/
Totally recommended.
#6 by Dan G. Switzer, II on October 30, 2009 - 8:04 pm
Quote
I always staying away from pack’ed code–because it alters the source code and can make it difficult to track problems.
Also, the min’ed version (when using gzip on the server) is usally going to be smaller anyway.
#7 by Anuj Gakhar on October 30, 2009 - 10:02 pm
Quote
@Gary, Validity looks promising. I never heard about it before. Thanks for letting me know. However, given the amount of code I have written already, I am not gonna just switch to Validity. But in any future projects, I will definitely try.
@Dan, I agree now that I know the downsides of using packed code.
#8 by William Ukoh on November 2, 2009 - 6:24 am
Quote
I believe the mechanism used to pack JS files is inefficient and would cause errors in some browsers. I stopped “packing”my custom JS files, instead, I only minify them. jQuery doesnt even offer packed versions of its library, only source and minified versions
#9 by Amol on May 6, 2010 - 1:14 pm
Quote
I have a problem of jQuery validate plugin in IE 8. When error messages are displayed, the Html table data moves. I need to stop the data from moving.