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

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

Explorer ,
May 08, 2008 May 08, 2008
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>
512
Translate
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
Valorous Hero ,
May 08, 2008 May 08, 2008
LATEST
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>
Translate
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