w3HtmlCookie

Syntax   Parameters   Example Programs

Adds one or more cookies to the current form. Multiple cookies are set by passing multiple attributes for each parameter. w3HtmlCookie must be called before w3HtmlInit. Any calls to w3HtmlCookie made after the call to w3HtmlInit are not used. If multiple calls are made to w3HtmlCookie, all are set.

For more information about cookies, go to http://home.netscape.com/newsref/std/cookie_spec.html

Syntax

call w3HtmlCookie  (name , expire.date , expire.time , path , domain , secure )

Parameters

name

In

The information being stored in the cookie. This value must be specified for each cookie being set. Format is name=value, such as cookie1=rapid development. An all numeric date is assumed to be a date in D3 internal format. A date containing non-numeric characters is converted to an internal date.

expire.date

In

The date the cookie expires. Default is today. An all numeric date is assumed to be a date in D3  internal format. A date containing non-numeric characters is converted to a D3 internal date.

expire.time

In

The time the cookie expires. Default is one second before midnight GMT. An all numeric date is assumed to be a time in  D3 internal format. A time containing non-numeric characters is converted to a D3 internal time.

The expire.date and expire.time are combined to create the cookie's expiration timestamp. The cookie's expiration  timestamp is assumed to be GMT based. Localization of the timestamp is up to the application. So if expire.time is 1100 (GMT) equivalent time is 0300 PST. If neither expire.date or expire.time are specified, the cookie expires at midnight of the current day.  

path

In

Specifies a string which needs to match the leading characters of the current page's URL in order for the cookie to be returned.

domain

In

Limits the systems that receive the cookie. For example, www.rainingdata.com allows any system in the rainingdata.com domain to receive the cookie. The value www.rainingdata.com allows only the www.rainingdata.com system to receive the cookie.

secure

In

"" = not secure, not "" = secure.

 

Example Programs

cookie1

programming.bas3

programming.bas4

programming.bas5

programming.bas6

programming.bas7

programming.bas8a

programming.bas9a