Works a treat - thanks :-)
--Matt
---
Lee wrote:[color=blue]
>
groucho@mockfrog.com said:[color=green]
> >
> >I want to click on text and have it open a different *random* webpage
> >every time from a list of urls I have already provided.
> >
> >So if I have 3 pages - p1, p2, p3 - i want to be able to click the text
> >link and come up with, for e.g.: p2, p2, p3, p1, p2, p2, p2, p1 etc...[/color]
>
>
> <html>
> <head>
> <script type="text/javascript">
> p = [
> "http://www.myDomain/p1.html",
> "http://www.myDomain/p2.html",
> "http://www.myDomain/p3.html",
> "http://www.myDomain/p4.html",
> "http://www.myDomain/p5.html"
> ];
> function randomLink(list) {
> location.href=p[Math.floor(Math.random()*p.length)];
> }
> </script>
> </head>
> <body>
> <p>
> If Javascript is enabled, this link will go to a page selected
> randomly from the URLs contained in array "p".<br>
> If Javascript is not enabled, the link will go to
> "p1.html".
> </p>
> <a href="http://www.myDomain/p1.html"
> onclick="randomLink(p);return false">go</a>
> </body>
> </html>[/color]