4D v16.3

WEB SEND TEXT

Home

 
4D v16.3
WEB SEND TEXT

WEB SEND TEXT 


 

WEB SEND TEXT ( htmlText {; type} ) 
Parameter Type   Description
htmlText  Text in HTML text field or variable to be sent to the Web browser
type  Text in MIME type

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("<html><head></head><body>"+String(Current time)+"</body></html>";$blob;UTF8 Text without length)
 WEB SEND BLOB($blob;"text/html")

... can be replaced by the single line:

 WEB SEND TEXT("<html><head></head><body>"+String(Current time)+"</body></html>")



See also 

_o_Mac to ISO
WEB SEND BLOB

 
PROPERTIES 

Product: 4D
Theme: Web Server
Number: 677

This command can be run in preemptive processes

 
HISTORY 

Created: 4D v6.7
Renamed: 4D v13
Modified: 4D v14

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)