Hi All,

I am developing online examination process using jsp. The questions and options are fetched from the text files. For each page i am displaying one question and four options. I am calculating the answers by using radio button. I given a next button and previous button for navigation.

My problem is while going to the previously answered question the selected radio button is deselected. I have to set the radio button as selected.
Please give some ideas to solve this problem.

Advance thanks.

9 Years
Discussion Span
Last Post by masijade

I am not using session. I just writing the selected answers in a text file and using the text file i am validating the answers.

while going to previous the selected radio value should remain selected. But in my case it is deselected.



You need to use a session to keep track of what the user has entered, then during the loading of each page, you can check whether a session key exists for that question, and if so, check the radion button for that answer checked.

Peter's answer was a suggestion of what you should do, not a question about what you are doing.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.