posted 21 years ago
Hi all,
I have 2 pages , say page1.jsp and page2.jsp , i am getting some values from user as input in page1 and after pressing the submit button in page1.jsp, it goes to page2.jsp . In page2.jsp, i am getting these values input by user using a request.getParameter(). page2.jsp has many select lists. Depending on the values the user input in the page1, the select list has to be set to that initial values. For example, there is a select list named "letter type" with values type1 , type2, type3 . If the user selected type2 in the page1, then in page2 the "letter type" select list has to be pre-selected to type2 automatically. Also, I am initialising the "letter type" select list from a javascript file that is included in the page, i mean i dynamically generate the select list.
Can anyone tell me how to pre-select values in the select list. I know if we set the selected property of the option to "selected" it would work, but how to do this based on the user input??
Please let me know how to do this.
Thanks
Priyha