Problem in Radio button

Reply

Join Date: Oct 2007
Posts: 85
Reputation: hidash_in has a little shameless behaviour in the past 
Solved Threads: 0
hidash_in's Avatar
hidash_in hidash_in is offline Offline
Junior Poster in Training

Problem in Radio button

 
0
  #1
Apr 14th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,241
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 491
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Problem in Radio button

 
-1
  #2
Apr 14th, 2009
Session is what you need to maintain
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 85
Reputation: hidash_in has a little shameless behaviour in the past 
Solved Threads: 0
hidash_in's Avatar
hidash_in hidash_in is offline Offline
Junior Poster in Training

Re: Problem in Radio button

 
0
  #3
Apr 14th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,450
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 262
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: Problem in Radio button

 
0
  #4
Apr 14th, 2009
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.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for JSP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC