Eliminating Textarea Whitespaces on UDF retuned values

2006-06-21 Thread Michael E. Carluen
I'm currently using a UDF that returns a simple alpha-num value. When used inside a form textarea, the value generates several leading whitespace chars. Wrapping it in trim() doesn't work. Any suggestions? Thank you. ~|

Re: Eliminating Textarea Whitespaces on UDF retuned values

2006-06-21 Thread Nathan Strutz
It could be chr(160) - the literal character for the non-breaking space (nbsp;). Trimming won't cut it out. Instead, try a replace on it. replace(myString,chr(160),,ALL) -nathan strutz http://www.dopefly.com/ On 6/21/06, Michael E. Carluen [EMAIL PROTECTED] wrote: I'm currently using a UDF

Re: Eliminating Textarea Whitespaces on UDF retuned values

2006-06-21 Thread Rob Wilkerson
You could also try using a regex to strip \s*: REReplaceNoCase ( textAreaString, '^\s*', '' ) -- Rob Wilkerson On 6/21/06, Nathan Strutz [EMAIL PROTECTED] wrote: It could be chr(160) - the literal character for the non-breaking space (nbsp;). Trimming won't cut it out. Instead, try a

Re: Eliminating Textarea Whitespaces on UDF retuned values

2006-06-21 Thread Rob Wilkerson
Sorry, I probably should have been more specific. The \s should strip any representation of standard whitespace. Other non-printing characters will not be stripped. You might want to try using the asc() function to see what at least one of those characters might be: asc ( left ( myString, 1 )

RE: Eliminating Textarea Whitespaces on UDF retuned values

2006-06-21 Thread Michael E. Carluen
Whitespaces on UDF retuned values Sorry, I probably should have been more specific. The \s should strip any representation of standard whitespace. Other non-printing characters will not be stripped. You might want to try using the asc() function to see what at least one of those characters might

Re: Eliminating Textarea Whitespaces on UDF retuned values

2006-06-21 Thread Rob Wilkerson
Subject: Re: Eliminating Textarea Whitespaces on UDF retuned values Sorry, I probably should have been more specific. The \s should strip any representation of standard whitespace. Other non-printing characters will not be stripped. You might want to try using the asc() function to see what

RE: Eliminating Textarea Whitespaces on UDF retuned values

2006-06-21 Thread Michael E. Carluen
: Eliminating Textarea Whitespaces on UDF retuned values That is strange. Is that the true code where the spaces occur? It would make sense to me if the actual code was something like textarea #methodName ( number )# /textarea But your sample code is so compacted that I wonder where the whitespace

Re: Eliminating Textarea Whitespaces on UDF retuned values

2006-06-21 Thread Denny Valliant
Did you specify output=false for your function? Could be that simple... :D On 6/21/06, Michael E. Carluen [EMAIL PROTECTED] wrote: Thanks Rob Nathan. Actually I was able to come-up with a work-around. The workaround is to put the value inside a local variable outside of the textarea.