Flux rss

[Javascript]Choosing a link at random

Published by hyts78, last update on Sunday November 16, 2008 04:17:35 AM by hyts78

[Javascript]Choosing a link at random






Here below is a script that creates a hyperlink directing visitor to an address chosen at random from a list.

The following code is inserted between <HEAD> and </ HEAD> tags at the top of the page:

<SCRIPT Language="Javascript">
<!--
function Randomlink()
{
Url = new Array;
Url[0] = "http://www.kioskea.net/index.php3";
Url[1] = "http://www. kioskea.net/wifi";
Url[2] = "http://www. kioskea.net/php";
Url[3] = "http://www. kioskea.net/forum/";

Chooselink = Math.round(Math.random() * (Url.length+1));
window.open(Url[Chooselink],'_blank');
}
//-->
</SCRIPT>


Don’t forget to insert the following code within <BODY> and </BODY>) tags in order to display the link :

<A Href="#" onClick=" Randomlink (); return(false)">Random link</A>
What to choose; Blog, Wiki or CMS? What to choose; CMS, Blog or Wiki? What is a Blog? What is a Wiki? What is CMS? Useful Links If you want to edit some contents on the web, there are some easy ways to do it without having to require the use of a website. However,... en.kioskea.net/faq/sujet-591-what-to-choose-blog-wiki-or-cms
Linksys router works for a while, then stops Hello, I have a Linksys router which has been working fine for the most part for the past couple years. Problem: The internet works fine for about 20-25 minutes, then randomly stops working...but still shows that it has a connection. I simply unplug... en.kioskea.net/forum/affich-31033-linksys-router-works-for-a-while-then-stops
Internet - Routing of IP packets Routers are devices which make it possible to "choose" the path that datagrams will take to arrive at the destination. They are machines with several network interface cards each one of which is linked to a different network. So, in the simplest... en.kioskea.net/internet/routage.php3
Choosing the right power supply for your computerChoosing the right power supply for your computer The power supply will surely be the last part of your computer that you will look for whenever you are assembling your own computer. Moreover this remains an integral part of your... en.kioskea.net/faq/sujet-588-choosing-the-right-power-supply-for-your-computer
Choose the right blog hosting service and create your own blogChoose the right blog hosting service and create your own blog What is a Blog? How to create your own blog Step 1: Choose your Blog Hosting service Step 2: Sign up for an account Step 3: The layout Step 4: Promote your blog What... en.kioskea.net/faq/sujet-262-choose-the-right-blog-hosting-service-and-create-your-own-blog
Choosing the right cpuChoosing the right cpu AMD Processors HyperTransport technology AMD Compatibility constraints Choosing your AMD processor Intel Processors Front Side Bus (FSB) Intel Compatibility constraints Choosing your Intel... en.kioskea.net/faq/sujet-372-choosing-the-right-cpu
Computer doesn't boot normally NEED HELP!!!!My computer has always done this random thing where it will say that it wasn't shut down properly (but it was) and it goes to the screen before startup when you choose to go into safe mode or last good known configuration ect. It used to be that... en.kioskea.net/forum/affich-19577-computer-doesn-t-boot-normally-need-help
My favorite Network ConnectionHello, I just installed the Linksys wireless N Router WRT160N and it works fine. My only question is when I chose the network connection which was mine and added it to my favorites it doesn't automatically choose that on start up and I have to go... en.kioskea.net/forum/affich-31189-my-favorite-network-connection
TROUBLE WITH LINKSYS ROUTER WRT54GSHello, I have a new Linksys router WRT54gs and a new Dell laptop. The router works well with the cable attached but when I go to wireless I get a strong signal but unable to get on the internet with WEP security. With security disabled the wireless... en.kioskea.net/forum/affich-10899-trouble-with-linksys-router-wrt54gs
Download Codec pack suiteCodecPack Suite is a pack of audio and video codecs to select automatically install codecs to limiting the risk of incompatibilities. It has over 200 codecs and many utilities and useful links. The intuitive interface allows you to choose the codec... en.kioskea.net/telecharger/telecharger-1668-codec-pack-suite
Computer - Random access memory There are generally two broad categories of random access memory: DRAM memories (Dynamic Random Access Module), which are inexpensive. They are used essentially for the computer's main memory SRAM memories (Static Random Access Module), which are... en.kioskea.net/pc/ram.php3
Linking two PCs with a null modem cable The best way to link two computers is to use an RJ45 cable to connect the machines' network cards. However, when one or both of the computers has no network card, there is still a fairly easy way to connect them, by using communication ports (found... en.kioskea.net/elec/nullmodem.php3
WiFi - Data link layer and access methods The data link layer of the 802.11 standard is composed of two sublayers: the Logical Link Control layer (or LLC for short), and the Media Access Control layer (or MAC). The MAC layer defines two different access methods: The CSMA/CA method, which... en.kioskea.net/wifi/wifimac.php3