Hi
Have a problem writing what i am sure is simple Javascript but have been trying to get round a problem for ages.
The program asks the user to enter either 1 or 2 (there is a window prompt to say what option 1 and 2 are)
When they enter 1 or 2 the program then displays a appropriate message on the screen.
If the user enter any other value a message appears telling them they have entered a wrong value and to try again.
So far this all works fine. What i am having trouble with is i want the program to bring up the window prompt with the first question again (please enter 1 or 2) this can be done with a simple loop but i only want the program to do the loop once. If the user enters a wrong value again i want the program to end.
If anyone can offer any help with this i would be very grateful. I am a newbie at Javascript so i hope it's not really simple!!!!!
Cheers
Matt
p.s. can post my code so far if it helps?