Hi, I am trying to produce 5 random integers and display them. Problem is, the following code renders differently in each browser. Chrome won't display the random values, IE does it right, firefox displays the rand values but then they are replaced with original <A>, like the code had looped! I'm afraid the script tag is too generic but really I am in the dark.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<SCRIPT type="text/javascript" language="JavaScript">

diceArray = new Array(5)

function rollDice()
var i;

for(i=0; i<5; i++)
diceArray[i]=Math.round(Math.random() * 6) % 6 + 1;


<a href="#" onClick="rollDice();">when I click should display 5 rand variables</a>