Cookies (Object)

Member of:

Session object

Description:

Represents a list of key value pairs, stored as cookies. Cookies are units of read only text (less than 4K) that exist in the Interactive Reporting document file deployed for the Interactive Reporting Web Client or EPM Workspace session.

Note:

Added key value pairs to the Cookies (Collection) do not write them back to the Web browser.

Example 1:

//Button 1 set action
var Username = ActiveDocument.ODSUsername
Session.Cookies.Add("User Cookie", Username)

//Button2 retrieve action
UserCookieValue = Session.Cookies["User Cookie"]
Alert("The username entered on the Server login is: "+UserCookieValue,"ODSUSername")

This example shows you how to retrieve the user name from the login:

Example 2:

This example shows how to test scripting in the client server version by creating temporary values in the:

//Add some test cookies 
  Session.Cookies.Add("MyCookie","MyValue")
  Session.Cookies.Add("ApplicationName",Application.Name)
//Write out the values to the console window
  Console.Write (Session.Cookies["MyCookie"])
  Console.Write (Session.Cookies["ApplicationName"])

Methods:

Add(String Key, String Value), Item (Key as string)

Properties:

Read-only: Property Count As Number