PROCESS HTML TAGS

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004


PROCESS HTML TAGS (inputData; outputData)

ParameterTypeDescription
inputDataBLOB | TextData containing HTML tags to process
outputDataBLOB | TextProcessed data

Description

The PROCESS HTML TAGS command causes the processing by 4th Dimension of 4D HTML tags contained in the inputData parameter (field or variable of the BLOB or Text type) and returns the resulting data in outputData.

This command lets you carry out processing on tagged HTML code without it being necessary for the Web server to send an HTML page using a command of the SEND HTML BLOB type or that a page suffixed ".shtml" be requested via a URL. It is not even necessary for the 4th Dimension Web server to be started.

Pass the data containing the tags to be processed in the inputData parameter. This parameter can be a field or variable of the BLOB or Text type. Keep in mind that it is generally prefereable to use the BLOB type since the number of characters is not limited (32,000 limit for the Text type).

All the HTML tags of 4D are supported (4DVAR, 4DSCRIPT, 4DLOOP, etc.), regardless of the Web server operating mode (contextual or non-contextual) — and even when it is not started.

Note: When using the 4DINCLUDE tag outside the framework of the Web server (Web process):

with 4th Dimension or 4D Server, the default folder is the folder containing the database structure file,

with 4D Client, the default folder is the folder containing the 4D Client application.

After command execution, the outputData parameter receives the data of the inputData parameter, along with the result of the processing of any 4D HTML tags that it contains, when applicable. If inputData does not contain any 4D HTML tags, the contents of outputData is identical to that of inputData.

The outputData parameter may be a field or a variable, but it must be of the same type as that of the inputData parameter.

This command makes it possible to store the values resulting from the processing of HTML tags in the database before they are sent.

It also permits the parsing of 4D HTML tags apart from the use of the Web server. In particular, you can use it to send e-mail messages in HTML format that contain processing of and/or references to data contained in the database via the 4D Internet Commands.

Example

The following example shows how this command works:

   C_BLOB($in)
   C_BLOB($out)
   C_TEXT($in_text)
   C_TEXT(Var)
   C_TEXT(VarHTML)

   Var:="<B>"
   $in_text:="<p><!--#4DVAR Var--></p>"
   TEXT TO BLOB($in_text;$in;Text without length)
   PROCESS HTML TAGS($in;$out)
   VarHTML:=BLOB to text($out;Text without length) 
      ` HTMLvar contains <p>&lt;B&gt;</p>

See Also

4D HTML Tags.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next