> hey guys, anyone know what this isn't working. its been a
> while since i've been working with cold fusion.
>
> input: 384-29394-3928
>
> <cfscript>
> Replace(attributes.employee, "-", "", "all");
> </cfscript>
>
> output: 384-29394-3928
>
> I am trying to remove the dashes "-" from the employee number
You'll need to output the value of your variable, right?
<cfscript>
WriteOutput(Replace(attributes.employee, "-", "", "all"));
</cfscript>
or if you're referencing the variable later on:
<cfscript>
myvar = Replace(attributes.employee, "-", "", "all");
</cfscript>
....
<cfoutput>#myvar#</cfoutput>
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists