Dear fellow scripters
CAN ANYONE HELP ME!!
when i press the roll button it rolls the dice for me but it wont allow me
to roll any more it just sticks with the dice pictures.
can you help solv the problem heres the script.... <html>
<head>
</head>
<script language="JavaScript">
<!--
function getRandom( max ) {
iRandom = Math.round((Math.random() * max + 0.5));
return iRandom;
}
function getdice(){
rnd1 = getRandom(6);
rnd2 = getRandom(6);
rnd3 = getRandom(6);
rnd4 = getRandom(6);
rnd5 = getRandom(6);
rnd6 = getRandom(6);
// show the picture.
document.writeln("<img src='dice/die" + rnd1 + ".gif'>");document.writeln
("<img src='dice/die" + rnd2 + ".gif'>");document.writeln("<img
src='dice/die" + rnd3 + ".gif'>");document.writeln("<img src='dice/die" +
rnd4 + ".gif'>");document.writeln("<img src='dice/die" + rnd5
+ ".gif'>");document.writeln("<img src='dice/die" + rnd6 + ".gif'>");
}
// --></script>
<body>
<body bgcolor="black">
<BR>
<BR>
<BR>
<br>
<input type="button" value="roll" onclick="getdice()">
</body>