View Single Post
Old 03-26-2003, 04:52 AM   #1 (permalink)
jcramer83
Registered User
 
jcramer83's Avatar
 
Join Date: Mar 2003
Location: Kansas
Posts: 3
jcramer83 is on a distinguished road
Unhappy Javascript Function

Ok, this is my first time posting on this site, so bear with me.

I'm working on a project for my javascript class, and it involves creating a page that comes up with two random one digit numbers, and you put a document.writeln() that contains "What is 5 times 3 "(for example).

The user has to input a number for what they think is the answer. If the user is correct, the page is supposed to say in the status bar "Very good" and create a new problem. And if the user is incorrect, it repeats the same question over and over until the user is correct.

Now here's my problem, we are supposed to use a function, and its supposed to be called both at execution of page, and everytime the user is correct.

I have it coded to the point that when you run it, it will give you a math problem, and will display the correct msg in the statusbar. But thats it, it wont repeat. Did that w/o functions. Now I'm trying to get it to do what I want it to w/ functions, but there's something I am missing.

If you all want, I could post the code later...

Any help as to the right direction to go with this would be very helpful!
jcramer83 is offline   Reply With Quote