1 Reply Latest reply on Apr 30, 2010 8:34 AM by ilssac

    cffunction returns space




      I am using coldfusionmx6 and created function.while it calling in xml it giving space.How to delete space?


      <cffunction name="datereplaceformat" returntype="string">
        <cfargument default="" name="datechange" required="No">
         <cfargument default="" name="formatchange" required="No">
      <CFSET var SDATE=reREPLACE(datechange,"#formatchange#"," ","all")>
      <CFSET var rspace=reREPLACE(SDATE," ","","all")>
      <cfreturn rspace>


      sample xml:










      In posting page it showing as















      Advance Thanks

        • 1. Re: cffunction returns space
          ilssac Level 5

          Adding the output="no" property to the the <cffunction...> tag so that ColdFusion does not include any whitespace from the function may help.


          You may also want to consider some of ColdFusion's other whitespace management features.  <cfsilent>...</cfsilent>  <cfsetting enableCFoutputOnly="Yes"> being a couple of the most utilized.

          1 person found this helpful