I haven't seen a method that will trim in JS - but this is the code we use here:
function trim (strVar) {
while(strVar.charAt(0)==" ")
strVar=strVar.substring(1,strVar.length);
while(strVar.charAt(strVar.length-1)==" ")
strVar=strVar.substring(0,strVar.length-1);
return strVar;
}
Accessed like:
var strTrimmed = trim (strUntrimmed);
Mike
-----Original Message-----
From: Doug Melvin [mailto:[EMAIL PROTECTED]]
Sent: Monday, 18 December 2000 6:36 PM
To: dynapi-help
Subject: [Dynapi-Help] semi-OT: TRIM()
is there a jscript equiv of the vbscript trim() method?
To trim leading and trailing spaces off of a string..
Doug Melvin
