|
|
Click on a heading below to select a JavaScript. To
view the source code for the JavaScript Right Click
the mouse button over the JavaScript window and then
select "View Source" from the pop-up window
Copy and paste the code. If any graphics are used in
the script. Right Click the mouse button over each graphic
and then select "Save Picture As" from the
pop-up menu. All the graphics should be put in the same
directory as the JavaScript. To go back to the Index
just close the JavaScript window.
|
|
| Address
Book. |
Saves an address book database as a cookie on the user's
computer. The author explains that although the actual example
may not be particularly useful, the underlying code could
be very beneficial for use in other projects.
|
| Bookmark
Reminder. |
(Best with Internet Explorer) Pops up the "Add to Favorites"
bookmark window once a week, or after every certain number
of days. Netscape users are given an alert message to remind
them to bookmark the site.
|
| Cookie
Redirect. |
Let a JavaScript cookie remember your favorite background
color. On future visits, it automatically displays that background
color for you.
|
| Favorite
Bg. |
Redirects the visitor to different pages based on the value
of a stored cookie. If no cookie is found, the available items
are displayed for the user to pick from, which sets a cookie
for their next visit. Our demonstration uses a 'favorite animal'
cookie, but this could easily be modified to fit your needs.
|
| Name
Browser. |
This cookies records the visitor's name and also writes
the visitor's browser information to the screen.
|
| Name
Visits Last Visit. |
This cookie records the visitor's name, how many visits,
and the last visit.
|
| Name
Visits Msg. |
This cookie records the visitor's name, how many visits,
and displays a message depending on how many visits have been
recorded.
|
| User
Name. |
Cookies allow web pages to store information on the visitors
computer and to later retrieve that information. This cookie
records the visitor's name.
|
| Only
Popup Once. |
If you have a new window open up on your home page, it opens
every time your visitors come back to that page. This is rude
as well as very annoying thing to force onto your visitors.
But, using cookies, this script can determine if the visitor
has been here before, and only open a new window on their
first visit to the page. The next time they come back, the
script will read the cookie, identify them as a repeat visitor,
and NOT open the window again.
|
| Remove
Ads. |
Catches all clicks on ads and writes a cookie on the visitor's
computer. Until the cookie expires, no ads are shown.
|
| To
Do List. |
Keep your To Do list up to date with this script. Demonstrates
how to display, add and delete items from a list of cookies.
|