internet explorer - jQuery validation engine - [IE8] "object doesn't support this property or method" -


this error message apears if i'm using validationengine in internet explorer 8 (not tried other versions). in message written problem @ line 714, 4th character, code:

if(!required && !(field.val()) && field.val().length < 1 && rules.indexof("equals") < 0) options.iserror = false; 

i don't know problem

.indexof isn't supported in <= ie8.

as workaround create custom indexof() implementation, placed in perhaps centralised js script file targeted ie8. example,

// create self-invoking anonymous indexof() function (function () {     if (!array.prototype.indexof) {         array.prototype.indexof = function (obj, start) {             (var = (start || 0), j = this.length; < j; i++) {                 if (this[i] === obj) {                     return i;                 }             }             return -1;         };     } })(); 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -