L et your visitors ponder the meaning behind random quotes of "wisdom" with this fun script. It comes with a list of over 200 quotes, displayed randomly each time the page loads.
W e have tested the code in IE6.0, Firefox1.5.0.1, Opera8.54, Netscape7.02, Netscape8.0.4 and AOL Explorer1.2. This script worked well in all platforms with no variations observed.
D epending on your knowledge of HTML and javascripts, this is an easy one (1) part copy and paste code that goes anywhere in the <BODY> section of your document you want this effect to appear. It also makes use of an external .js file you need to save and upload into your directory then add a snipplet of code into the <BODY> section to call the external ponder.js file.
Note Of Importance: If you are not sure of howto make the external .js file and make use of it within your document, grab the below link and it is fully explained.
[ .js File Howto ]
I
f you notice, there is a form button in which you can manually change the random quote. If you do not want this button and only want the quote to change when the page is opened,
just remove the button. (color coded section). See below:
</script>
</div>
<p><button style="background-color:#ddffdd;color:navy;" onClick="GetStatement(1)">Next random Thought</button></p>
I f you choose to keep the button, you can reconfigure it to cosmetically blend with your site.
<button style="background-color:#ddffdd;color:navy;" onClick="GetStatement(1)">Next random Thought</button>
T he next thing we shall cover is the material setforth within the ponder.js uploaded script itself. Either prior to or after you have uploaded it, you can open it just like any other document and edit it for content. You can add more quotes if you want.
///////////////////////////////////////////////////////////////////////////////////////////////
// List the statements to display. Add statements as necessary.
var Statements = new Array(
'When companies ship Styrofoam what do they pack it in? ',
'Why is a carrot more orange than an orange? ',
'Why do we label underwear as a pair? ',
'What would a chair look like if your knees bent the other way? ',
'Why do firehouses have Dalmatians? ',
'Why is it called a TV \"set\" when you only get one? ',
'Why in a country with freedom of speech are there phone bills? ',
'Does the little mermaid wear an algaebra?',
'Why do scars never go away? ',
'Why don\'t sheep shrink when it rains? ',
Add more statements here
);
/*
GetStatement( ) is the primary function. It assumes the following:
For your Information: regarding the above. Notice what we have color coded in the above part of the .js code. \" and \'. This script makes use of both the quotation (") and also the apostrophe ('). If you are going to set a word in quotations (" ") or the word has an apostrophe (') such as "Don't, you must write it as shown in the above example or you will get an error message of Error" Expected 'j'.
On the page you are going to have this effect on or any page that will link to the page with this effect is on. "Be Sure of one thing within either the linking URL or the URL this effect is on. Be sure you "Do Not" have the backslash-forward slash / (which ever you call it) at the end of the linking URL. If you do, the effect "Will Not Work!. If this sounds confusing, see the below example:
S elect the links above to see what we are explaining about the Correct and Incorrect URL address.
W
e hope our tutorial was easy to follow and we covered everything in detail. If you would like to add this effect into your pages, grab the respective below link and you are there. If you have any problems with this or anything else, feel free to consult our [ FAQ ] and if you can't find the answer there, [ contact us ].
[ Get Code Here ]
[ Rate This Page ]
Search Our Site By Individual letter
[ A ]
[ B ]
[ C ]
[ D ]
[ E ]
[ F ]
[ G ]
[ H ]
[ I ]
[ J-K ]
[ L ] |
Little Tips Directory [ Page 1 ] [ Page 2 ] [ Page 3 ] [ Page 4 ] [ Page 5 ] [ Page 6 ] [ Page 7 ] |
[ Index Page 1 ]
[ Index Page 2 ]
[ Index Page 3 ]
[ Index Page 4 ]
[ Index Page 5 ] [ Index Page 6 ] [ Index Page 7 ] [ Index Page 8 ] [ Index Page 9 ] [ Index Page 10 ] [ Index Page 11 ] [ Index Page 12 ] [ Index Page 13 ] [ Form Index ] [ 2001 ] [ 2002 ] [ 2003 ] [ 2004 ] [ 2005 ] [ 2006 ] [ 2007 ] [ Disclaimer ] [ News Letter Archives ]
[ Navigation Page ]
[ Archives Of Published Material ] |
If you are part of the ever growing number of webmasters who enjoy
sharing your knowledge with others on web design, join The
Consigliere Ltd. web ring to broaden your scope of exposure.
Join Today
This Site Was Built And Is Maintained Exclusively by
The Webmaster @ Consigliere Ltd.
Copyright © Consigliere Ltd., All Rights Reserved. 2001-