Creates an HTML document header, <head> section and <body> tag.

This FoxPro code:

Response.DocHeader("Hello World","css/westwind.css,css/myapp.css")

creates the following HTML document header:

<!DOCTYPE html>
    <title>Hello World</title>
    <link rel="stylesheet" type="text/css" href="css/westwind.css" />
    <link rel="stylesheet" type="text/css" href="css/myapp.css" />

You can also add additional head section content as a raw string. For example the following adds a couple of JavaScript incudes into the page:

lcScripts = ;
[<script src="scripts/jquery.js" type="text/javascript" ></script>] + CRLF +;
[<script src="scripts/ww.jquery.js" type="text/javascript" ></script>]

Response.DocHeader("Hello World","css/westwind.css,css/myapp.css",lcScripts)

o.DocHeader(lcTitle, lcStyleSheets, lcHeaderItems, llNoOutput)


A title for the page (maps to <title> head element)

A comma delimited list of stylesheets to add to the page.

Any additional header items you want to have embedded into the page. Content is take as is and added to the end of the <head> section.

See also:

Class wwPageResponse

© West Wind Technologies, 1996-2022 • Updated: 09/07/11
Comment or report problem with topic