Hi,I want to develop a webpage (page1.jsp) that has 2 textboxes,user id and user name,and abutton find user.when i click on find user button ,all the user id and names must be displayed on next page(page2.jsp) in one list.something like this...

USER ID USER NAME
123 george
456 Emily
789 Noelle

submit cancel

say, i want to select Emily,so when i click on 456 Emily both get selected and on clickin SUBMIT button these values need to be passed to page1.jsp textboxes...i.e. in user id 456 and in user name Emily.

I am able to get in a list format but only when i give one OPTION tag for both the user id and user name field.

<option >
	<%
	out.println(enum.nextElement());    %>
	
	&nbsp;&nbsp;&nbsp;&nbsp;
	<%
	out.println(enum.nextElement());    %> </option>

I don know how to pass these values on submit.Is there a way?can i use session variables?..bt how?..thx..

If you are talking about getting the values of a drop down list at the server side, it can be done by doing request.getParameter("nameOfSelectBox"); A better way of displaying the user list will be render it as table with the user id hyperlinked which would then take the user to the corresponding page when clicked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.