Click to See Complete Forum and Search --> : Times Table Drill Help


gibger
03-08-2003, 05:27 AM
Hi, I have a small query. What I have done so far is below.

<html>
<head>
<title>Times table Drill 2</title>
</head>
<body>
<script language="JavaScript">
<!-- hide code
var e
e = (Math.random() * 11 ) + 1;
document.write(parseInt(e));
document.write("<br>");

var f
f = (Math.random() * 11 ) + 1;
document.write(parseInt(f));

var g
g = prompt("Please mutliply the two numbers", "Answer");


if ( e * f)
{
alert("Congratulations, your answer is correct");
}


-->
</script>
</body>
</html>

What needs to be done. I've got this far. Next needs the form needs to display 2 new integers(numbers).

Any help would be appreciated.

Thanks

:)

khalidali63
03-08-2003, 07:29 AM
Your question seems vague,please describe it,

Cheers

Khalid

khalidali63
03-08-2003, 08:17 AM
ok..if thats what you want,then here is a"Better" guess a number game

:D

http://68.145.35.86/skills/javascripts/GuessANumberGame.html

Cheers

Khalid

khalidali63
03-08-2003, 08:23 AM
lol..I know I just said it was a better "Guess a Number Game"

:p

Khalid

khalidali63
03-08-2003, 08:25 AM
He Dave,are you swamped with emails and stuff since you are a devoted moderator as well now?...is it overwheming you?

Khalid

gibger
03-08-2003, 07:24 PM
ok, I should have put it a bit simpler. here is what I need.

"I need to create a form that displays 2 randomly generated integers between 2 and 10 and a promt for the user's answer. it then produces a pop-up message saying whether the answer was the correct mutliplication of the ingeters. The forn then displays 2 new ingeters."

If you check mine out you will see that I have the 2 numbers randomly appearing and a prompt for an answer. I also have an alert saying that the answer is right. What I need is more script for when the answer is wrong and after that 2 new generated integers.

I hope that explains it a bit more.

:)

gibger
03-08-2003, 08:19 PM
Dave what you put here was great and I do plead guilty. it is for an assigment. It's just that last part that is driving me batty. This is the first time I have ever even touch JS.

gibger
03-11-2003, 05:30 PM
thanks Dave.