Today is . Page created 08/08/06

Feeling Lucky Feeling Lucky Navigation Lucky Four leaf Clover


Link opens in new window

Give your users a chance to be spontaneous! Clicking on the button will re-direct them to a link chosen at random. You can specify any number of links, and they can open in the same window or a new one. A cookie is used to track which links are visited. The cookie is erased when the browser is closed.

We have tested the code in IE6.0, Firefox1.5.0.5, Opera9.0, Netscape8.1 and AOL Explorer1.2. This script worked well in all platforms with no variations observed.

Depending on your knowledge of HTML and javascripts, this is an easy two (3) part copy and paste code that goes in both the <HEAD> and <BODY> sections of your document. It also makes use of an external .js script you need to save and upload into your directory then add a snipplet of code into the <HEAD> section to call the external.js file.

Warning Logo     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 ]

For Your Information For your Information:     If you are not comfortable or prefer not to use the external.js file, you can use the traditional cut/copy and paste instead of the external .js file. If you need a little refresher on what is required to achieve this, grab the below link and it is fully explained.
Traditional Cut/Copy and Paste ]

Step One Depending on which of the above methods you have selected (external.js file or Traditional Copy/Cut & Paste), you will add either the snipplet of code (after you have uploaded the external.js file) into the <HEAD> section or the completed section of code that you added the opening and closing script tags.

Snipplet Of Code

<script type="text/javascript" src="feelLucky.js">
</script>
Traditional Copy/Cut and Paste

<SCRIPT LANGUAGE="JavaScript">

<HEAD> Section of code goes here

//  End -->
</script>

Arrow External .js file



Arrow Traditional Copy/Cut & Paste Code with opening & closing tags that you had to add into the <HEAD> section of code that was originally earmarked to be an external .js file.

If you would like to see an example of this effect using the "Traditional Cut/Copy & Paste" method, grab the below link and you are there. Examine our "Source" code (on the page you will be opening) to see how we had to reconfigure it to make it work. We have it very well documented for your convenience.
Traditional Cut/Copy & Paste Method ]

The below reconfigurations are to either the feelLucky.js file you have uploaded or the section of code you have added into the <HEAD> section and have added the opening and closing javascript tags.

<!---- Reconfigurations <HEAD> Section ---->

// When a "lucky" destination has been decided upon, shall
// the browser open a new window with the desitination URL?
// (Specify "y" or "yes" if yes new window; otherwise "".)
var NewWindow = "y";

// Specify your lucky destination URLs here. The first is
// assigned to Lucky[0], the next to Lucky[1], and so
// forth, in numerical sequence -- as many as you want.

Lucky[0] = "URL Goes Here";
Lucky[1] = "URL Goes Here";
Lucky[2] = "URL Goes Here";
Lucky[3] = "URL Goes Here";

// No additional JavaScript customizations are required. //

Step Two Once you have completed the above all that is left is to paste the code for the form button anywhere in the <BODY> section where you want it to appear to activate the effect.

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 ]