|
Posted by Jonathan N. Little on March 21, 2008, 1:12 pm
Please log in for more thread options Geoff Cox wrote:
> On Fri, 21 Mar 2008 09:40:41 -0400, "Jonathan N. Little"
>
>> <?php
>>
>> $links = array('a.html','b.html','c.html','d.html');
>> $last=count($links)-1;
>> $link=$links[rand(0,$last)];
>>
>> echo "<a href=\"$link\">Mystery Tour</a>";
>>
>> ?>
>
> I didn't save as .php file!
>
> Any thoughts on this one?
>
> <script type="text/javascript">
> function getNextPage(){
> var num = Math.random();
> if (num<.5) {
> location.href="test1/test1.htm";
> } else {
> location.href="test2/test2.htm";
> }
>
> }
> </script>
>
> <IMG alt="image" src="assets/images/movelab1.gif"
> onClick="getNextPage();">
>
> The reason for the 2 pages is that this web site will have some music
> related exercises and we wish to have a kind of control group etc.
And what will happen if the visitor has JavaScript disabled?
The server side solution means it doesn't matter.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
|