I tried to apply .trim()
to a string in one of my JavaScript programs. It's working fine under Mozilla, but an error displays when I try it in IE8. Does anyone know what is going on here? Is there anyway I can make it work in IE?
code:
var ID = document.getElementByID('rep_id').value.trim();
error display:
Message: Object doesn't support this property or method Line: 604 Char: 2 Code: 0 URI: http://test.localhost/test.js
"whatever ".trim()
try that on IE8. – Dan Rosenstarktrim()
, and wouldn't believe my eyes when I figured out it was unsupported. Thanks for clearing that out. I was going to ask the same as you asked. – Mathias Lykkegaard Lorenzen