I have the function 'Trim'.
However, I am experiancing errors as soon as it gets to
return str.replace(/^\s*|\s*$/g,"");
Is there something wrong with this code?
Code:
/*
FUNCTION NAME: Trim
Removes any white space from either side of the string
*/
function Trim(str)
{
return str.replace(/^\s*|\s*$/g,"");
}
Thanks,
Picco
www.crmpicco.co.uk