Friday, January 05, 2007

Flush output from inside cfscript

So, you have a huge cfscript section but you want to flush some output without ending the cfscript? Maybe you are looping over some data and want flush out some data as it loops. Now, I bet you are thinking what I was. How can I do this? I can't use cfflush inside cfscript. You are right, but there is a way. Try this:

getPageContext().getOut().flush();

This works just like cfflush. It will flush all generated output to the browser. But, you can use it inside cfscript!

That is it for now,

--Dave

No comments: