jquery - IE 8 javascript problem -


hi following code throws "object doesn't support property or method" error in ie.. var value = $input.val().replace(/ /g, '').trim(); part of form validation, in every other browser working well, in ie doesnt..please help

from ben rowe: add following code add trim functionality string.

if(typeof string.prototype.trim !== 'function') {   string.prototype.trim = function() {     return this.replace(/^\s+|\s+$/g, '');    } } 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -