How to open a new link everytime the page is reloaded by someone else?
<p>I'm trying to open build a system which opens a new link every time an anchor tag is clicked. I tried using random function but at times it opens the same link again and again. But whereas as I want the link to open in an order and follow the cycle.. That is if I have three links, the user clicking the anchor text first time will open the first link, then second, then third and later again the first link..</p>

<p>This means <strong>the link must change if a different user clicks</strong>.</p>

<p>Here is a code that I found which uses random function..</p>

<pre><code>&lt;script type="text/javascript'&gt;
function random_3(){
    var myrandom=Math.round(Math.random()*2)
    var link1="http://www.codingforums.com"
    var link2="http://www.cssdrive.com"
    var link3="http://www.dynamicdrive.com"
    if (myrandom==0)
        window.location=link1
    else if (myrandom==1)
        window.location=link2
    else if (myrandom==2)
        window.location=link3
}
&lt;/script&gt;
&lt;form&gt;
&lt;input type="button" value="random link!" onClick="random_3()"&gt;
&lt;/form&gt;
</code></pre>

<p>so can someone help me out with this?</p>