|
| |
|
|
adamnjen
Posts: 3 From: houston, tx., usa Status: offline
|
How to auto present a randon string of text? - 5/16/2001 20:49:00
I cannot figure out how to take a file which contains a series of phrases, quotes, lines of text, etc... and randomly choose one of the phrases and display it on my web page every day or even every hour.
|
|
|
|
Rian
Posts: 1960 From: Lincoln, Nebraska USA Status: offline
|
RE: How to auto present a randon string of text? - 5/16/2001 14:40:00
J-BOTS have a component that can do that and there is a number of free javascripts that can do the same thing.For J-Bots look on the left side towards the bottom of the page... --------------<< Here | | | V Rian 
------------------ Webmaster SR Web Creators http://www.srwebcreators.com _ _____________ _ "Press ENTER once to quit or twice to save changes..." _ _____________ _
|
|
|
|
adamnjen
Posts: 3 From: houston, tx., usa Status: offline
|
RE: How to auto present a randon string of text? - 5/16/2001 23:05:00
Is there a way to JUST get the "tip of the day" and not the other components?
|
|
|
|
DarlingBri
Posts: 3123 From: Left of Centre, Cork, Ireland Status: offline
|
RE: How to auto present a randon string of text? - 5/17/2001 20:04:00
In your head tag:<script language="JavaScript"> <!-- Hide from old browsers var a = Math.random() + "" var rand1 = a.charAt(5) quotes = new Array quotes[1] = "Do not meddle in the affairs of sysadmins, for they are subtle and quick to anger. (ThinkGeek.com)" quotes[2] = "Alcohol and calculus don't mix. Never drink and derive. (ThinkGeek.com)" quotes[3] = "We are Drunk of Borg. Resilience is floor tile. Wan'be sim'lated?" quotes[4] = "How depressing. Nobody's after my job. (Frasier)" quotes[5] = "A paperless office has about as much chance as a paperless bathroom." quotes[6] = "If Bill Gates had a nickel for every time Windows crashed..." quotes[7] = "BREAKFAST.SYS halted. Cereal port not responding" quotes[8] = "If there's anything more important than my ego around, I want it caught and shot now. (Hitchhiker's Guide to the Galaxy)" quotes[9] = "File not found. Should I fake it? (Y/N)" quotes[0] = "Bad or missing mouse. Spank the cat? (Y/N)" var quote = quotes[rand1] // -- End Hiding Here --> </script> Put this in your page body where you want it to appear: <p align="center"><font size="-1">"<script language="JavaScript"> <!-- Hide this script from old browsers -- document.write("</i>" + quote + "</i>") // -- End Hiding Here --> </script>" </font></p>
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|