dcsimg
I have a combobox (select/option input) filled with...
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   markovic_marko
Posted On:   Thursday, March 15, 2001 07:55 AM

I have a combobox (select/option input) filled with strings. Now, when i chose an item from the combox how to take this string and send it to a next Jsp page ?


How to use sessions correctly (with details when possible)?


How to send values (string, integer,vectors) with sessions and jsp to another jsp page?

Re: I have a combobox (select/option input) filled with...

Posted By:   jyothi_lature  
Posted On:   Monday, March 19, 2001 11:31 AM

Hi markovic,

On submitting this page all the parameters are automatically passed to the next page. To get the selected value, you can use the following code:

String seleceted_value = request.getParameter("listName");

With sessions, before sending this, store it in session variable by using this code:
session.putValue("SELECTED_VALUE", seleceted_value);
//session.putValue("ID", value);
The stored value can be retrieved whenever necessary by using this code:
String selecetd_value=(String)session.getValue("SELECTED_VALUE");

bye.
jyothi

Re: I have a combobox (select/option input) filled with...

Posted By:   Guruprasad_LR  
Posted On:   Monday, March 19, 2001 03:38 AM

Using the onSelect() function of the Select/option box call a javascript function and pass the selected value into a hidden field. Then submit the form. Once submitted, these values will become available in the subsequent page by using the request.getParameter() method.
or
alternatively if simple entities (integers or strings) are to be made available on the next JSP page, you could concatenate it to the URL and submit the form.
About | Sitemap | Contact