Hi,

Thanks for your reply Mark.

I tried the option you suggested. but that thing gives me a null value

Regards

Kamal

-----Original Message-----
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: 05 January 2004 16:23
To: Struts Users Mailing List
Subject: Re: selecting a value from drop down list


umm.. ehhh


perhaps

<option value="">

could be why you get no value (in fact i suspect thats it).. The 
parameter will be whatever is in the value attribute, if you leave the 
value attribute out then it will default to the display string 
presented between the option tags..



On 5 Jan 2004, at 17:05, Kamal Gupta wrote:

> Hi,
>
> Thanks for your reply robert.
>
> I am using struts and in the action i am using
> request.getParameter("sname");
>
> for all other text boxes i get the value using request.getParamter();
>
> but I dont get any value for the drop down list.
>
> Can you help me more
>
> Regards
>
> Kamal
> -----Original Message-----
> From: Robert Taylor [mailto:[EMAIL PROTECTED]
> Sent: 05 January 2004 16:01
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: selecting a value from drop down list
>
>
> Assuming you are using Struts to process the form submission,
> once the user selects a value from the drop down list and submits
> the form to be processed, the action which you have configured to
> handle this form submission, will have access to the selected value
> via the form configured to store the posted request information.
> Once inside your action you would do something like the following:
>
> MyForm myForm = (MyForm) form;
> String sName = myForm.getSname();
> // update database with sName value
>
>
> robert
>
>
>> -----Original Message-----
>> From: Kamal Gupta [mailto:[EMAIL PROTECTED]
>> Sent: Monday, January 05, 2004 10:42 AM
>> To: Struts Users Mailing List
>> Subject: selecting a value from drop down list
>>
>>
>> Hi,
>>
>> I have a drop down list in my jsp page the code is shown below
>>
>> <td width="100"><b>Name</b></td>
>> <td>
>>      <select name="sName" style="width:225px">
>>              <logic:iterate id="results" name="sNameSetup"
>> property="nameList"
>> scope="session">
>>                      <option value=""><bean:write name="results"
>> property ="sName"
>> /></option>
>>              </logic:iterate>
>>      </select>
>> </td>
>>
>>
>> When I run this jsp page it displays a list of all names in a
>> drop down list
>> on the jsp page.
>>
>> What i want to do is
>>
>> User will select one of the names from the above select drop down
>> list and i
>> want to get that value from the jsp page and store it into the 
>> database.
>>
>> how should i get that value from the jsp page
>>
>> Please help me
>>
>> Regards
>>
>> Kamal
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to