 |
Cookies Extension Methods Library
In the properties and methods below, obj is an abbreviation for
the object name you specified when you called the qForm constructor. Arguments in
bracket ("[ ]") are optional.
Functions
- _createCookiePackage(object struct)
-
The _createCookiePackage() takes a structure and converts the structure in to an encoding
string. The string that is created is then saved as a single cookie. The _readCookiePackage()
function will convert the string back in to it's original structure.
The struct argument is required and should be equal to a simple structure.
- _deleteCookie(string name, [string path], [string domain])
-
The _deleteCookie() function will remove a cookie from the user's computer.
The name argument is the name of the cookie you'd like to delete. This is a required
parameter.
The path argument is the directory path which the cookie was assoiciated with.
This is an optional parameter.
The domain argument is the domain which the cookie was assoiciated with.
This is an optional parameter.
- _getCookie(string name)
-
The _getCookie() function will retrieve a cookie from the user's computer.
The name argument is the name of the cookie you'd like to retrieve from the browser.
This is a required parameter.
- _readCookiePackage(string package)
-
The _readCookiePackage() function will take a string created by the _createCookiePackage()
function and return the original structure passed to the _createCookiePackage() function.
The package argument is a required parameter.
- _setCookie(string name, string value, [string expires], [string path], [string domain], [boolean secure])
-
The _setCookie() function will set a cookie to the user's computer.
The name argument is the name of the cookie you'd like to save. This is a required
parameter.
The path argument can be used to assoiciated the cookie with a specific directory on
the web server. This is an optional parameter.
The domain argument can be used to associate the cookie with multiple servers within
the same domain. This is an optional parameter.
The secure argument is used to specify whether or not the cookie should be saved via
SSL. This is an optional parameter.
Methods
- obj.loadFields()
-
The loadFields() method will retrieve any existing form field elements that
were saved for the current form using the saveFields method. If nothing was
saved, then no action will take place.
- obj.saveFields()
-
The saveFields() method will save all the form field elements from the
selected form into a single cookie. You can restore the form by calling
the loadFields() method.
- obj.saveOnSubmit()
-
The saveOnSubmit() method is used to automatically save the contents
of the form to a cookie. This process is automatically attached to the
form's onSubmit event.
[< Back]
[Index]
[Next >]

|
 |