To support reporting, I want to strip out all carriage returns in my text boxes. I wrote the following code that does not work:
//If carriage return found, remove it.
function isNewLine( field )
{
var l_field_value = field.value;
var l_field_str = l_field_value.toString();
l_field_str = l_field_str.split(“n”);
field.value = l_field_str.join(” “);
return true;
}//end function isNewLine()
onChange, the text box goes from:
This is a test of a carriage
return
to this:
This is a test of a carriage
return.
Note that the code does find the newline. I want the code to strip it out and wrap the text around the box.
Thanks in advance for your help. I really do appreciate the help from this forumn!
Dave [B]onChange, the text box goes from: