• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Reading a Cookie

Once you've set a cookie, you'll need to retrieve it in order to do anything useful. The last example set the cookie with the text string "Tom." The very simple Script 10.2 shows you how to get that value from the cookie and display it on the screen (of course, you normally would not show off your cookies; this script just displays the cookie as an example).

Script 10.2. This short script reads a previously set cookie and sends it to the document window.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint