diff -r 000000000000 -r 40c8f766c9b8 src/cm/media/js/lib/yui/yui_3.0.0b1/examples/cookie/cookie-advanced-example.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/media/js/lib/yui/yui_3.0.0b1/examples/cookie/cookie-advanced-example.html Mon Nov 23 15:14:29 2009 +0100 @@ -0,0 +1,186 @@ + + + + + YUI Library Examples: Cookie: Advanced Cookie Example + + + + + + + + + + + + + + +
+
+
+

+ + YUI 3.x Home - + +

+
+ + +
+ + + +
+
+
+
+

YUI Library Examples: Cookie: Advanced Cookie Example

+
+
+ +

Note: This is YUI 3.x. Looking for YUI 2.x?

+ +
+
+
+
+ +

Cookie: Advanced Cookie Example

+ +
+

+

This example shows how to get, set, and remove cookies using the YUI Cookie utility.

+ +
+
+ + + + +

Click the buttons to interact with the cookie:

+ + + + + + + +
+
+
+ +

Advanced Cookie Example

+

This example consists of three buttons, each of which performs one of the basic cookie functions: getting a value, +setting a value, and removing a value. The first button, "Get Value", retrieves the value of a cookie +and displays it in an alert:

+ +

The second button, "Set Random Value", creates a random value and sets the cookie's value equal to it:

+ +

After clicking this button, you can go back and click "Get Value" to see the new value that was assigned +to the cookie (you can also check the logger output).

+

The third button, "Remove Value", completely removes the cookie from the page:

+ +

When this button is clicked, it removes the cookie. If "Get Value" is clicked immediately afterwards, the +value should be null.

+ +
+ +
+
+ + + +
+ +
+

Copyright © 2009 Yahoo! Inc. All rights reserved.

+

Privacy Policy - + Terms of Service - + Copyright Policy - + Job Openings

+
+
+ + + +