Fortune Cookies
We thought we would do something fun, as well as useful,
this week. How about a fortune cookie?
In the material world, a fortune cookie is a thin layer
of dough folded and baked around a slip of paper bearing
a prediction of fortune or a proverb or the like.
Virtual fortune cookies can be offered on web sites with
JavaScript. The "fortune" would not have to be a prediction
or saying. It can be pretty much anything you wish.
Here are examples:
-
A fortunate discount on merchandise the site user
was buying anyway.
-
An inspirational verse.
-
A coupon code for a product.
-
A gift.
-
A random link to a related web site.
-
An ad for something related to web page subject
that feels special to the site visitor.
It is a way to offer fun information to your site visitors.
How to Get the JavaScript Code:
The generator makes this
really simple. Just fill in the form and click the button.
The generated JavaScript is copy 'n paste.
Use the JavaScript fortune cookie code generator whenever
you feel like it. And tell others about it. (You'll even
find some suggested links and text to add to your web page
and/or blog!)
This JavaScript function can be a fun addition to your
web site. Let us know what unique implementation you think
of.
Question:
Did you find this article interesting and understandable? How can it be improved?
Your response is anonymous.
When done typing, click anywhere outside the box. [more info]
Will Bontrager
©2005 Bontrager Connection, LLC
Please note:
Articles on this website are presented "as is". However -
If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Ask one of our Experts and you'll have your answer!
Click here for details.