Can you send flushed content to ColdFusion 8 Ajax UI containers?

No. Ok, so what do I mean? Imagine this simple code:

<h2>Flush Test</h2>

<cfdiv bind=”url:testi.cfm” > </code>

This page will load, create the div, and then load testi.cfm into the div. What does testi.cfm do?

<p> This is how we start... </p> <cfoutput>#repeatString(" ", 250)#</cfoutput>

<cfflush>

<cfset sleep(2000)>

<p> This is how we end later on…. </p> </code>

As you can see - I have an intro paragraph, a flush, a pause (the sleep function), and the rest of the text. When you load the file in your browser, ColdFusion will not display the results in the div until the page is completely done.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Comments