Hi,
i was wondering if anyone could help me.
i have two bits of code
<html>
<body>
<script type=”text/javascript”>
number1 = parseInt(Math.random() * 6+1);
number2 = parseInt(Math.random()
number3 = parseInt(Math.random() * 6+1);
number4 = parseInt(Math.random()
document.write(number1 + “” + number2 + “” + number3 + “” + number4);
document.write(‘<img src=”die’+ number1 +’.bmp”>’);
document.write(” “);
document.write(‘<img src=”die’+ number2 +’.bmp”>’);
document.write(” “);
document.write(‘<img src=”die’+ number3 +’.bmp”>’);
document.write(” “);
document.write(‘<img src=”die’+ number4 +’.bmp”>’);
</script>
</body>
</html>
This displays 4 random die images i have saved in file
an this is the 2nd one
<html>
<body>
<script type=”text/javascript”>
function nextroll(){
number1 = parseInt(Math.random() * 6+1);
number2 = parseInt(Math.random()
number3 = parseInt(Math.random() * 6+1);
number4 = parseInt(Math.random()
document.Score.display.value+=(number1 + “” + number2 + “” + number3 + “” + number4)+”n”;
}
document.write(‘<img src=”die’+ number1 +’.bmp”>’);
document.write(” “);
document.write(‘<img src=”die’+ number2 +’.bmp”>’);
document.write(” “);
document.write(‘<img src=”die’+ number3 +’.bmp”>’);
document.write(” “);
document.write(‘<img src=”die’+ number4 +’.bmp”>’);
</script>
<form name=”Score”>
<center>
<input type=”button” value=”roll” onclick=nextroll()>
<input type=”reset” value=”reset”>
<textarea name=”display” rows=”20″ cols=”40″ readonly></textarea>
</form>
</body>
</html>
as you can see in the 2nd one i want a button that on roll displays everything, and puts it into a text box
it does that, but doesnt even display the image
ive even tried making the function cover that action too