| | |
Problem in Radio button
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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.
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.
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
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
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.
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
----------------------------------------------
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
![]() |
Similar Threads
- Radio buttons: Preventing the onClick event if the radio button is already checked (JavaScript / DHTML / AJAX)
- Problem with Radio Button error "[object HTMLInputElement]" (PHP)
- Radio Button - AJAX - Problem with Passing Value (JavaScript / DHTML / AJAX)
- Problem with Radio Button / AJAX (JavaScript / DHTML / AJAX)
- radio button vs textbox ala Javascript (JavaScript / DHTML / AJAX)
- problem with my radio button validation js (JavaScript / DHTML / AJAX)
- Am not able to get a radio button selection to display in output (PHP)
- Security Settings -> Java permission -> Custom (radio button) -> Java Custom Settings (Web Browsers)
- Problem passing value from radio button to second page. (PHP)
Other Threads in the JSP Forum
- Previous Thread: How to populate data in combobox dynamically depends on othr combobox using ajax jsp
- Next Thread: J2EE - Beans problem .. need ideas
| Thread Tools | Search this Thread |
Tag cloud for JSP
apache array backbutton combobox comma connection csv database development directorystructure dropdownlist dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 mysql netbeans network parameters passing ping printinserverinsteadofclient project read redirect request.getparameter response seperated servlet servletdopost()readxml sessions software sql ssl state_saving_method stocks sun tomcat tutorial update values video web write






