Webmonkey
Powered by Atomz.com



Quick Reference:

• Javascript Code Library
HTML Cheatsheet
Special Characters
Color Codes
Browser Chart
Stylesheet Guide
Unix Guide
Glossary
Domain Registries

Reference   JavaScript Code Library

This set of functions eases the pain of using cookies. It includes separate functions to set, read, and kill cookies, as well as a function to test whether the user accepts cookies at all.

Usage:
WM_setCookie('name', 'value'[, hours, 'path', 'domain', secure]);
where name, value, and path are strings, and secure is either true or null. Only name and value are required. Note: hours can be either a number of hours until the cookie expires or a GMT-formatted date string such as 'Fri, 13-Apr-1970 00:00:00 GMT'.

WM_readCookie('name');
Returns the value associated with name.

WM_killCookie('name'[, 'path', 'domain']);
Remember that path and domain must be supplied if they were set with the cookie.

License: Webmonkey Public License

Cut, paste, and enjoy!


Feedback  |  Help  |  About Us  |  Contribute  |  Jobs
Advertise  |  Privacy Statement  |  Terms and Conditions

Copyright © 1994-2000 Wired Digital Inc., a Lycos Network site. All rights reserved.