wwResponse::HTMLHeaderEx
This method allows you to create custom HTMLHeader and HTTPHeader objects and pass it to this method for output creation.
o.HTMLHeaderEx(lvHTMLHeader, lvHTTPHeader)
Returns
"" or string if llNoOutput = .T.
Parameters
lvHTMLHeader
An instance of the wwHTMLHeader class which contains output for the HTML document header including ,
lvHTTPHeader
An instance of the wwHTTPHeader object, which contains output for the HTTP header. An HTTP header is required on every outgoing docment. If object is not passed a default text/html header is created.
You can also pass in a default header string that contains just the content type (like text/xml for example) or a directive (like FORCE RELOAD).
If not passed or passed empty a default header is generated.
Example
FUNCTION Headertest
loHTMLHeader = CREATEOBJECT("wwHTMLHeader",Response) loHTTPHeader = CREATEOBJECT("wwHTTPHeader",Response)
loHTTPHeader.DefaultHeader() loHTTPHeader.AddForceReload() loHTTPHeader.AddCookie("laston",TTOC(DATETIME()))
loHTMLHeader.AddTitle("Header Test Page") loHTMLHeader.AddPageRefresh(Request.GetCurrentUrl(),5) loHTMLHeader.AddJavaScript([function test {] + CRLF + [alert("test"); } ] ) loHTMLHeader.AddVBScript([function test ] + CRLF + [MsgBoxt("test") ] + CRLF + [end func]) loHTMLHeader.AddStyleSheet("/westwind.css") loHTMLheader.cBodyTag = [
]Response.HTMLHeaderEx(loHTMLHeader,loHTTPHeader)
- ** This is
Response.Write("
Header Test Page
") Response.Write("
" + TIME() ) Response.HTMLFooter()
ENDFUNC