Its not exactly a well kept secret that web developers loathe IE6, but I never expected to leave out a simple function such as String.trim().
A simple test script such as this would cause an error.
alert(" hello world ".trim());
Luckily, theres an easy fix for that! Simply paste this code near the top before any trim() calls are made.
if (!('trim' in String.prototype)) {
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,""); };
}
[ Source ]