Results 1 to 3 of 3

Thread: Links

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Location
    Liverpool, England
    Posts
    155

  2. #2
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    The first step is to find a random number generator script thingy...

    Then you need a list of links.


    Then you make a script to randomly choose a link from the list.

    Easy.
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  3. #3
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Try this


    Code:
    <HTML><HEAD>
    
    <script language=javascript>
    var url=new Array("http://www.vbforums.com/showthread.php?s=&threadid=147764", "http://www.vbforums.com/showthread.php?s=&threadid=147765","http://www.vbforums.com/showthread.php?s=&threadid=147767", "http://www.vbforums.com/showthread.php?s=&threadid=147768", "http://www.vbforums.com/showthread.php?s=&threadid=147769", "http://www.vbforums.com/showthread.php?s=&threadid=147781", "http://www.vbforums.com/showthread.php?s=&threadid=147782")
    
    </script>
    
    <script>
    <!--
    // The Central Randomizer 1.3 (C) 1997 by Paul Houle ([email protected])
    // See:  http://www.msc.cornell.edu/~houle/Ja...andomizer.html
    
    rnd.today=new Date();
    rnd.seed=rnd.today.getTime();
    
    function rnd() {
            rnd.seed = (rnd.seed*9301+49297) % 233280;
            return rnd.seed/(233280.0);
    };
    
    function rand(number) {
            return Math.ceil(rnd()*number);
    };
    
    // end central randomizer. -->
    
    </script>
    
    
    
    <head>
    <body>
    <script lanugage=javascript>
    var i 
    i=rand(url.length) -1
    document.write("<a href='" + url[i] + "'>" + url[i] + "</a><br>")
    
    
    </script>
    
     
    
    </BODY></HTML>
    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width