In my JS I added a trim() method to a String object to trim whitespaces in
a string, hoever, it does not work. A value in the string is the same
before and aftertrim() is called. What am I doing wrong?
<script language="javascript">
String.prototype.trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g,"");
}
function saveTheBankParameter()
{
var
asserid=document.entryform.ser_id.options[document.entryform.ser_id.selectedIndex].value;
asserid=asserid.trim();
......
Henry
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org