WriteOutput

Print a message with line break to the buffer

Method Signature

WriteOutput(message=[any])

Arguments

Argument
Type
Required
Description
Default

message

any

true

The message to print

Examples

Output the literal string "Hello World"

Run Example

writeOutput( "Hello World" );

Output the equivalent string as a variable

Run Example

greeting = "Hello World";
writeOutput( greeting );

Using the encodeFor argument

CF2016+ Passing in html to the encodeFor argument wraps the result with a call to encodeForHTML.

Run Example

name = "Pete";
writeOutput( "Hello " & name, "html" );

Result: Hello Pete

Additional Examples

Run Example

html_paragraph = "<p>The Boxlang project is led by the Boxlang Association&nbsp;Switzerland a non-profit&nbsp;<a href=""https://en.wikipedia.org/wiki/Swiss_Verein"">swiss association</a>. A growing project which is committed to the success of its community by delivering quality software and a nurturing&nbsp;and supportive environment for developers to get involved.</p>";
writeOutput( html_paragraph );

Last updated

Was this helpful?