SEND HTML BLOB

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 6.5


SEND HTML BLOB (blob; type{; noContext})

ParameterTypeDescription
blobBLOBBLOB to send to the browser
typeStringData type of the BLOB
noContextBooleanTrue = Switch to non contextual mode
False = Keep current mode

Description

The SEND HTML BLOB command allows you to send blob to the browser.

The type of data contained in the BLOB is indicated by type. This parameter can be one of the following types:

type = Empty String (""): In this case, you don't need to supply any more information in the BLOB. The browser will try to interpret the contents of the BLOB.

type = File extension (example: ".HTM", ".GIF", ".JPEG", etc.): In this case, you specify the MIME type of the data contained in the BLOB by indicating its extension. The BLOB will then be interpreted according to its extension. However, the extension must be a standard one so that the browser can correctly interpret it.

type = Mime/Type (example: "text/html", "image/tiff", etc.): In this case, you directly specify the MIME type of data contained in the BLOB. This solution offers you more freedom. Besides the standard types, you can pass a custom MIME type to send proprietary documents via Intranet. To do so, you only need to configure the browsers so that they recognize the type sent and so that they can open the appropriate application. The value you pass to type is, in this case, "application/x-[TypeName]". In the client workstations's browser, you reference this type and associate it to the "Launch the application" action. The SEND HTML BLOB command allows you to therefore send all types of documents, the Intranet clients automatically open the associated application.

Note: If the BLOB is of type "text/html" (.htm, .html, .shtm, .shtml), it is translated and analyzed as an HTML file. In this case, when used in contextual mode, SEND HTML BLOB works exactly as SEND HTML FILE. That is, a 4D method that issues a SEND HTML BLOB("") call should be called in one of the HTML pages, in order to terminate the original SEND HTML BLOB call. For more information, refer to the SEND HTML FILE command description.

Here is a list of the most common MIME types:

ExtensionMime/Type
.htmtext/html
.htmltext/html
.shtmltext/html
.shtmtext/html
.csstext/css
.pdfapplication/pdf
.rtfapplication/rtf
.psapplication/postscript
.epsapplication/postscript
.hqxapplication/mac-binhex40
.jsapplication/javascript
.txttext/plain
.texttext/plain
.gifimage/gif
.jpgimage/jpeg
.jpegimage/jpeg 
.jpeimage/jpeg
.jfifimage/jpeg
.picimage/pict
.pictimage/pict
.tifimage/tiff
.tiffimage/tiff
.mpegvideo/mpeg
.mpgvideo/mpeg
.movvideo/quicktime
.moovvideo/quicktime
.aifaudio/aiff
.aiffaudio/aiff
.wavaudio/wav
.ramaudio/x-pn-realaudio
.sitapplication/x-stuffit
.binapplication/x-stuffit
.zapplication/x-zip
.zipapplication/x-zip
.gzapplication/x-gzip
.tarapplication/x-tar

Note: For more information, go to http://www.iana.org and look for "Protocol Numbers and Assignment Services" topics.

The noContext parameter allows you to tell the 4D Web server that you want to switch from contextual mode to non-contextual mode. In this case, pass True to noContext.

If the parameter is omitted or contains False, the current mode is used.

The references to 4D variables and 4DSCRIPT type tags in the page are always parsed, whatever the mode.

Example

Refer to the example of the routine PICTURE TO GIF.

See Also

SEND HTML FILE.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next