See also: killCookie, setCookie

Function used to read a cookie.

Syntax

JSV_readCookie(name)

Prototype

n/a

Returns

The JSV_readCookie function returns the value associated with name.

Parameters

The JSV_readCookie function uses the following arguments.

Argument Description
name A sequence of characters excluding semicolon, comma and white space. To place restricted characters in the name or value, use an encoding method such as URL-style %XX encoding.

Remarks

n/a

Dependencies

n/a

Example

The following lines of code

var cookie_Name = "JavaScriptVision";
var displayText =
    ( (JSV_readCookie(cookie_Name) == 1) ? 
    "You are visiting the JavaScript Vision Library!" : 
    "You have not visited the JavaScript Vision Library at this time." );
document.write( displayText );

produce