An interesting bit about the cfsilent
tag.
The official example from Adobe on the cfsilent page is the following:
<h3>cfsilent</h3>
<cfsilent>
<cfset a = 100>
<cfset b = 99>
<cfset c = b-a>
<cfoutput>Inside cfsilent block<br>
b-a = #c#</cfoutput><br>
</cfsilent>
<p>Even information within cfoutput tags does not display within a
cfsilent block.<br>
<cfoutput>
b-a = #c#
</cfoutput>
</p>
As expected, nothing between the cfsilent tags is displayed:
But what do you think it happens if you add a cfabort
on line 9, right before closing the cfsilent
tag? 🙂
<h3>cfsilent</h3>
<cfsilent>
<cfset a = 100>
<cfset b = 99>
<cfset c = b-a>
<cfoutput>Inside cfsilent block<br>
b-a = #c#</cfoutput><br>
</cfabort></cfsilent>
...
This happens:
The c
variable content is suddenly displayed (-1
), but not the other text inside cfoutput
. A bit strange if you ask me…
Written by Dorin Moise (Published articles: 277)
- Likes (0)
-
Share
- Comments (0)