[url]http://awads.net/wp/2005/06/15/coldfusion-and-white-space/[/url]
Wondering if this is a bug. Using the following code. <cfapplication name="test" sessionmanagement="yes"> <cflock timeout="20" type="exclusive" scope="session"> <cfscript> SESSION.cfcEmployee = createObject("component", "Employee"); SESSION.cfcEmployee.setFName("Joe"); getterVar = SESSION.cfcEmployee.getFName(); </cfscript> </cflock> <cfoutput> SESSION.cfcEmployee.fname = #SESSION.cfcEmployee.fName# getFName() = #Trim(SESSION.cfcEmployee.getFName())# getterVar = #getterVar# </cfoutput> This is the output in the html source code... SESSION.cfcEmployee.fname = Joe getFName() = Joe getterVar = Joe When I try to output the value directory w/my cfc 'getFName()' method, I cannot get rid of the whitespace. I've tried using trim() to no avail. Any thoughts?...
Wondering if this is a bug. Using the following code.
<cfapplication name="test" sessionmanagement="yes">
<cflock timeout="20" type="exclusive" scope="session">
<cfscript>
SESSION.cfcEmployee = createObject("component", "Employee");
SESSION.cfcEmployee.setFName("Joe");
getterVar = SESSION.cfcEmployee.getFName();
</cfscript>
</cflock>
<cfoutput>
SESSION.cfcEmployee.fname = #SESSION.cfcEmployee.fName#
getFName() = #Trim(SESSION.cfcEmployee.getFName())#
getterVar = #getterVar#
</cfoutput>
This is the output in the html source code...
SESSION.cfcEmployee.fname = Joe
getFName() =
Joe
getterVar = Joe
When I try to output the value directory w/my cfc 'getFName()' method, I
cannot get rid of the whitespace. I've tried using trim() to no avail. Any
thoughts?
[url]http://awads.net/wp/2005/06/15/coldfusion-and-white-space/[/url]
You may have a carriage return in your string or other wierd characters,
which would not go away using the trim function. Maybe you can use a regular
expression to replace any non-alpha character with an empty string.
"BSterner" <webforumsusermacromedia.com> wrote in message
news:dajodk$mgi$1forums.macromedia.com...Any> Wondering if this is a bug. Using the following code.
>
> <cfapplication name="test" sessionmanagement="yes">
> <cflock timeout="20" type="exclusive" scope="session">
> <cfscript>
> SESSION.cfcEmployee = createObject("component", "Employee");
> SESSION.cfcEmployee.setFName("Joe");
> getterVar = SESSION.cfcEmployee.getFName();
> </cfscript>
> </cflock>
> <cfoutput>
> SESSION.cfcEmployee.fname = #SESSION.cfcEmployee.fName#
> getFName() = #Trim(SESSION.cfcEmployee.getFName())#
> getterVar = #getterVar#
> </cfoutput>
>
> This is the output in the html source code...
>
> SESSION.cfcEmployee.fname = Joe
> getFName() =
> Joe
> getterVar = Joe
>
>
> When I try to output the value directory w/my cfc 'getFName()' method, I
> cannot get rid of the whitespace. I've tried using trim() to no avail.> thoughts?
>
Bookmarks