FrontPage Templates & Web Design - Your One Stop Resource Center!

FrontPage Templates & Web Design Web Design with FrontPage Templates
  FrontPage Universe Templates - Home FrontPage Universe Templates - About Us FrontPage Universe Templates - Contact Us FrontPage Universe Templates - Privacy Statement FrontPage Universe Templates - Terms of Service FrontPage Universe Templates - Search
Web Design Templates
Join Our FrontPage Newsletter  
 

 

Home
FrontPage Templates
Site Evaluation Tools
FrontPage Resources
Web Site Promotion
Web Hosting
Affiliate Programs
Internet Marketing
Web Software
SE Optimization
Web Design Tips & Tricks
ClickBank Portal
Privacy Policy
Links

 

 

Web Design Tips

FrontPage Universe Tips

 Add a Random Quote to your Webpage


Here is a simple Javascript code snippet that you can add to your webpage that will produce a random quote every time the page loads. You can add the quotes that you would like to have displayed to the new array area and the script will call as needed.

This part of the script goes between the <head> and </head> tags of your webpage.

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
// Add the quotes you wish to use here. Ensure you use exactly
// the same format or the code will break.
quotes = new Array("Now is the Best Time to Get Frontpageuniverse Hosting",
"frontPageuniverse has the best WebTools on the Internet",
"FrontPageuniverse Members Rock",
"Get your own Membership at FrontPageuniverse.com")
brave = quotes.length
function randQuote(){
randomNum = Math.floor
((Math.random() * brave))
document.mesays.quoterot.value = quotes[randomNum]
}
</SCRIPT>

This line of code replaces your <body> tag on your webpage.

<BODY onLoad="randQuote()">

Place this part of the script on your page where you would like the quotes to appear. Feel free to modify this to suit your website.

<div align="center">
<!-- in the form below adjust the 'size' as needed to ensure your quotes will fit. The 'style' can be eliminated or modified to suit your own website. Hope you enjoy this script. -->
<FORM name="mesays">
<INPUT type="text" name="quoterot" size="55" style="font:bold 11px verdana;color:#FFFFFF;background-color:#FF0000;">
</FORM>
</div>
 


 

 

Join our FrontPage Universe Newsletter
Please Subscribe to our FrontPage Web Design Newsletter

 

 
 
 
 
 
 
 
 

 

Contact: info@frontpageuniverse.com
Copyright © 2003 (FrontPage Universe). All rights reserved.

Last Modified October 12, 2007