• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

concatenate question

Guest
Aug 14, 2007 Aug 14, 2007

Copy link to clipboard

Copied

i am not getting corret when i do concatenate

example

<Cfset abc="<ABC>" & "<cfoutput>#emp.test#</cfoutput>" & "</ABC>">
<cfoutput>#abc#</cfoutput>

I need output like <ABC>34343</ABC>

But i am getting 34343. Any idea. Thanks.
TOPICS
Advanced techniques

Views

310

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 14, 2007 Aug 14, 2007

Copy link to clipboard

Copied

<CFSET abc = "<ABC><CFOUTPUT>" & emp.test & "</CFOUPUT></ABC>">

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 14, 2007 Aug 14, 2007

Copy link to clipboard

Copied

Nope it doesn't work. I am not getting like

<ABC>3434</ABC>

I am getting 3434

Any idea? thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 14, 2007 Aug 14, 2007

Copy link to clipboard

Copied

> <Cfset abc="<ABC>" & "<cfoutput>#emp.test#</cfoutput>" & "</ABC>">
You don't need the cfoutput.

> I am getting 3434
Its probably there but not displayed because the browser is treating it as a tag. Try HTMLEditFormat

<CFSET abc = "<ABC>" & emp.test & "</ABC>">
<cfoutput>#HTMLEditFormat(abc)#</cfoutput>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 14, 2007 Aug 14, 2007

Copy link to clipboard

Copied

LATEST
I missed it. The < and > around ABC are being translated as the beginning and ending of a HTML tag. Try this:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation