Class Context() Professional

Class function of the Context class

Description

A Context object provides information about the connection between Web browser and WAA gateway. It is passed as the second parameter to a registered form-function. Example:

FUNCTION _Register( oPackage ) 
   oPackage:registerForm( "UserForm" ) 
RETURN 

FUNCTION UserForm( oHTML3, oContext ) 
   <...> 
RETURN .T. 

With methods in the group Connection information about the connected gateway can be retrieved.

Methods in this group Session management allow attaching persistent data to a session consisting of multiple HTML pages. This way, data entered by a user in an HTML page can be stored within a registered form-function by passing them to the oContext:setCargo() method. When a user selects the next HTML page, stored data can be retrieved in another form-function using oContext:getCargo().

Connection
:getDocRoot()
Query the document root.
:getEnv()
Query a CGI environment variable on the gateway.
:getReferer()
Query the referrer.
:getRemoteAddr()
Retrieve the client's IP address.
:getRemoteBrowser()
Query name of the Web browser.
:getRemoteEMail()
Query the remote eMail address of the client
:getRemoteHost()
Query the remote hostname
:getRemoteUser()
Query the authenticated username.
:getScriptName()
Query the scriptname used by the HTTP server.
:getServerName()
Query the name of the HTTP server.
:getServerSoftware()
Query the name of the HTTP server software.
Session management
:openSession()
Open a session.
:closeSession()
Close a session.
:setCargo()
Store a value in the session.
:getCargo()
Retrieve a value stored by :setCargo()
E-mail
:sendMail()
Sending an e-mail via the connected gateway.
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.