3021Lesson 7: Add a quote of the dayhttp://www.haneng.com/lessons/7.aspLearn to make a random quote of the day. View the demo to see the result.
Intro:
Since you now are an expert on using files after lesson 4 (the Guestbook), let's make something a little bit more fancy. I often see people having a "tip of the day", or a "quote of the day", and I thought I should try to make a VBScript variant. It reads the quotes from a text file (for easy maintenance), and displays it.
The code:
Let's start coding! First make a text file in a directory. Fill it with your quotes, one on each line. To make it easier later on, add the number of quotes (lines) on the first line (alone). Now your text file will look something like thisASP > Tips and Tutorials > Quote DisplayOct 10, 2006
Learn to make a random quote of the day. View the demo to see the result.
Intro:
Since you now are an expert on using files after lesson 4 (the Guestbook), let's make something a little bit more fancy. I often see people having a "tip of the day", or a "quote of the day", and I thought I should try to make a VBScript variant. It reads the quotes from a text file (for easy maintenance), and displays it.
The code:
Let's start coding! First make a text file in a directory. Fill it with your quotes, one on each line. To make it easier later on, add the number of quotes (lines) on the first line (alone). Now your text file will look something like this
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.