I have an HTML page I am creating. It will contain a large list of questions to be answered. For here though, I will shorten it for simplicity.
1) The HTML page for this example will have two columns and ten rows. If the User answers the question correctly, then the background color in the answer cell (the rows in the first column) will change to Green. If the answer is wrong, then the background will change to Red.
So are a few examples: Question 1 is to be True and the User types in T. The background color behind the T now changes to Green.
Question 2 is to be True and the User types in a F. The background color behind the F is to change to Red.
Question 3 is to be False and the User types in a F. The background color behind the F is to change to Green.
Question 4 is to be False and the User types in a T. The beckground color behind the T changes to Red.
As you can see, if the User types in the correct answer, the background color changes to Green. If they type in an incorrect answer, the background color changes to Red.
I do not know alot about Javascript so alot of help on this code is greatly appreciated.
Last, if this is the wrong place to post this question, since it does say Java instead of Javascript, I apologize. Maybe still you could still help.
Hi Brook. Well if you can use applets then it will be easy for you to do what you want. All you have to do is extend the JApplet or Applet class and at the same time implement Runnable interface. When you implement this interface, you should define run() method. In this method, you can put an infinite loop to keep checking the contents of cells(probably textfields). If the cell does not contain any data, ignore it. If it contains data then test if it is T or F. If T, change the color to green and if F, change the color to red. Well first I am not sure of what kind of applcation you are developing. If this does not help you, feel free to describe me your application requirements. If I can help, I would surely do that.