function printPraise()
{
var numPraises = 5
var ran_number=Math.round(Math.random()*(numPraises-1))
var praises=new Array(numPraises)
praises[0]=""(1)I love your products!!"
-- R.L."
praises[1]=""(2)I love your products!!"
-- M.M."
praises[2]=""(3)I love your products!!"
-- J.M."
praises[3]=""(4)I love your products!!"
-- M.P."
praises[4]=""(5)I love your products!!"
-- T.C."
document.write("<table border=1 cellspacing=1 bordercolor=#111111 width=90%><tr><td width=100%>")
document.write("<center>
<FONT lang=0 face=Arial size=1 FAMILY=SANSSERIF>") document.write(praises[ran_number]) document.write("</font>")
document.write("</td></tr></table></center>
")
}
printPraise()
The way the script works is it has a list of quotes. It then chooses one at random, and prints it while your webpage is being loaded. To customize the script, do the following:
- 1. Replace the words "(?)I love your products!!"
- 2. Replace the letters after the "--" with your customer's initials.
3. If you have more than 5 testimonials, just keep adding more lines. Make sure to increment the number in the brackets. (Make sure the first one is always number zero!)
4. When you have all your testimonials, set numPraises to the number of testimonials (this will be the highest numbered testimonial plus 1, because we start at zero). That's it!
Some guidelines to follow:
1. " is how you include a double quote in your testimonial. Notice I start and end each quotation with ".
2. If your quotation has a " in it, the script won't work. Either delete the ", or you can use ' or " in its place.
3. Because it is such an easy error to make, and most of you are amateurs at programming, I recommend doing a search on " to make sure that no " characters got accidentally embedded in a testimonial. If you miss just one, the script won't run!
Notice I embed some html into the testimonial--> the
. This means I could also embed hyperlinks in there, too! __________________
-Mike