Page created 03/05/07
State Trivia |
Displays trivia facts about any of the 50 states when selected from the pulldown menu. Facts include state capital, date admitted into the union, state flower, and state bird. The script could be modified to display details about products you sell, members in a club, etc. Cool!
We have tested the code in IE7.0, Firefox2.0.0.1, Opera9.10, Netscape8.1.2 and AOL Explorer1.5. This script worked well in all platforms with no variations observed.
Depending on your knowledge of HTML and javascripts, this is an easy two (2) part copy and paste code that goes in both the <HEAD> section and <BODY> (wherever you want it to appear) section. The only reconfigurations that we can see are that of cosmetic unless you are going to totally modify it for your own purpose.
These reconfigurations will be make within the <BODY> section of the code pertaining to the <table> </table> where the effect is residing. See below where and howto:
Default <form name=triviaform> |
Reconfigured <form name=triviaform> |
Explanation Of Above
The original (Default) table did not have any attributes to enhance it with a different colored border so what we did was remove the default (top two 2 lines of code - not including the opening form tag) and replaced it with the code (top five 5 lines of code - not including the opening form tag - including a complete font tag) for a table that has the attribute for a colored border and colored background.
Define The Above Reconfigurations
Little Extra Not Included In The Script: The <HEAD> and <BODY> sections of code are rather large and take up lots of space in your document. If you would prefer to make either both sections or just one section of code into external.js file(s) (after you make your reconfigurations*) and only have a snipplet of code in the <HEAD> and or <BODY> section(s) as opposed to the bloated overweight code, this is no problem. For the <BODY> section of code we have a [ Generator/Converter ] that takes the work out of converting all the code into an external file. All you need to do is copy and paste the <BODY> section of code into our converter and follow the steps.
[ Generator/Converter ]
* Once you put the <BODY> section of code into the converter, you can not make any more reconfigurations. That is why it is imperative you make your reconfigurations prior to adding the code into the converter.
The <HEAD> section is slightly different but just as easy. The default <HEAD> section of code has opening and closing script tags. To make it into an external.js file, you need to remove those tags, copy and paste what is left into a notepad, save as stateTriviahead.js (or any name you want), upload it to your direcory and paste a snipplet of code into the <HEAD> section to call the external file. See below on where and howto for the <HEAD> section.
Note Of Importance You may want to keep a copy of the original <BODY> section of code if at any time you may decide to change it. This way you will have the code to reconfigure then replace the external.js file with the updated one. If you would like to see the <BODY> section of code once it has been reconfigured in our Generator/Converter, grab the below link and you are there. Once you view this file, you will understand why you may want to keep a copy of the original <BODY> section of code.
[ Reconfigured <BODY> Section Of Code ]
For your Information: We named our external.js files stateTriviahead.js and stateTriviabody.js. This makes it easy for us to know which is which at any given moment.
We 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 ]