943,748 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 1205
  • JSP RSS
Apr 14th, 2009
0

Problem in Radio button

Expand Post »
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.
Last edited by hidash_in; Apr 14th, 2009 at 8:12 am.
Similar Threads
Reputation Points: 1
Solved Threads: 0
Junior Poster in Training
hidash_in is offline Offline
85 posts
since Oct 2007
Apr 14th, 2009
-1

Re: Problem in Radio button

Session is what you need to maintain
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 871
Code tags enforcer
peter_budo is offline Offline
6,656 posts
since Dec 2004
Apr 14th, 2009
0

Re: Problem in Radio button

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.

Thanks.
Reputation Points: 1
Solved Threads: 0
Junior Poster in Training
hidash_in is offline Offline
85 posts
since Oct 2007
Apr 14th, 2009
0

Re: Problem in Radio button

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.
Last edited by masijade; Apr 14th, 2009 at 8:58 am.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC