
July 18th, 2006, 11:17 AM
|
|
Registered User
|
|
Join Date: Jul 2006
Posts: 5
Time spent in forums: 38 m 3 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by MadCowDzz Here's an example script that might help you.
Sorry for the film/book reference... I was bored =)
Code:
<html>
<head>
<script type="text/javascript">
<!--
function get_random(max_value)
{
return Math.floor(Math.random()*max_value);
}
function learnTheRules()
{
var rule=new Array(5);
rule[0] = "The first rule of fight club is you do not talk about fight club. ";
rule[1] = "The second rule of fight club is you do not talk about fight club. ";
rule[2] = "Third rule of fight club, someone yells 'stop', goes limp, taps out, the fight is over. ";
rule[3] = "Fourth rule, only two guys to a fight. ";
rule[4] = "Fifth rule, one fight at a time, fellas. ";
rule[5] = "Sixth rule, no shirt, no shoes. ";
rule[6] = "Seventh rule, fights will go on as long as they have to. ";
rule[7] = "And the eighth and final rule: if this is your first night at fight club, you have to fight.";
alert(rule[get_random(5)]);
}
//-->
</script>
</head>
<body>
<h1>Welcome To Fight Club</h1>
<form name="form1">
<input type="button" value="Learn The Rules!" onclick="learnTheRules()">
</form>
</body>
</html>
|
Kinda but not sure that is quite what I need.
I need a list of links sort of like what's new, so it would be
Press release header here (that links to the press release page for that title)
Press release header here (that links to the press release page for that title)
Press release header here (that links to the press release page for that title)
Press release header here (that links to the press release page for that title)
And those need to be random from a list each time the page is refreshed.... does that make any sense at all?
|