File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Retain selected content in a JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Retain selected content in a JSP" Watch "Retain selected content in a JSP" New topic
Author

Retain selected content in a JSP

yudi raj
Greenhorn

Joined: Nov 11, 2011
Posts: 12
I have 2 jsp files: login.jsp and process.jsp....In login.jsp, I placed combo boxes and radio buttons. On selecting the values from the combo box and radio button and further submitting, the jsp displays process.jsp where it should retain the selected content. Here are both of my jsp files:

login.jsp
-----------


process.jsp
-------------


The radio button is not selected in the next page. However, I could retrieve the name through request.getParameter method. I think is something wrong in my javascript. Please let me know where I am going wrong. Thank you.
himanshu.harish agrawal
Ranch Hand

Joined: Oct 18, 2010
Posts: 47

Dude,

Here you go



uday singh rajpurohit wrote:The radio button is not selected in the next page.

If you had noticed then your drop was not working as well.
Also, you are not getting Gender text displayed, I will leave this to you to figure the problem!

Regards,
Himanshu
yudi raj
Greenhorn

Joined: Nov 11, 2011
Posts: 12
Thanks Himanshu
chetan sisodiya
Greenhorn

Joined: Nov 14, 2011
Posts: 12
uday singh rajpurohit wrote:Thanks Himanshu


Himanshu, the link you gave is I m familior with already. My problem is that I am not senting parameter to a diff page. I m posting dropdown's parameter on the same page. and on eveny ONCHANGE event on the first dropdown list proper result are reflectiung back on second parameter but the value of second drop down is set set back to default selected calue.. Is should be what I selected before.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Retain selected content in a JSP