Skip to main content
Inspiring
May 8, 2008
Question

This is a bug?. (Context validation error for tag cfdocument)

  • May 8, 2008
  • 1 reply
  • 553 views
Why i get this error?. a bug?.


Begin of the page...
<cfparam name="pdf" default="">
<cfif pdf eq '1'>
<cfdocument format="pdf">
</cfif>


end of the page
<cfif pdf eq '1'>
</cfdocument>
</cfif>
    This topic has been closed for replies.

    1 reply

    Inspiring
    May 8, 2008
    You cannot split the opening and closing tags in that manner. One option is to place the content inside a cfinclude. Then use the include inside your cfif statements.

    <cfparam name="pdf" default="">
    <cfif pdf eq '1'>
    <cfdocument format="pdf">
    <cfinclude template="file_with_the_content.cfm">
    </cfdocument>
    <cfelse>
    <cfinclude template="file_with_the_content.cfm">
    </cfif>