Skip to main content
Version: Next

WEB SEND TEXT

WEB SEND TEXT ( htmlText {; type} )

ParameterTypeDescription
htmlTextTextHTML text field or variable to be sent to the Web browser
typeTextMIME type

Description

The WEB SEND TEXT command directly sends HTML formatted text data.

The htmlText parameter contains the data to be sent. Since 4D does not check the parameter content, make sure that the HTML encoding is correct.

Any references to 4D variables and 4DSCRIPT type tags in the text are always parsed.

By default, if you omit the type parameter, 4D assumes that the data sent is of the "text/html" type. The command is then exactly the same as sending a BLOB of the "text/html" type using the WEB SEND BLOB command.
You can also use the type parameter to specify the MIME type of the text to be sent. For more information about the MIME types supported, refer to the description of the WEB SEND BLOB command.

Example

The following method:

 TEXT TO BLOB(""+String(Current time)+"";$blob;UTF8 Text without length)
 WEB SEND BLOB($blob;"text/html")

... can be replaced by the single line:

 WEB SEND TEXT(""+String(Current time)+"")

See also

WEB SEND BLOB

Properties

Command number677
Thread safe