Click to See Complete Forum and Search --> : Help with the Multiple option in Select


shukla1_alok
11-18-2003, 04:28 PM
Hi,

I have Select List which has the Multiple Selection option turned off.
When I submit my form via a method I turn on the Multiple Selection Option
to True and loop through the List and set the Selected Option for individual
element to true.But in my action Class I get back only one value from the List.

But if I put the Alert inside the function and do the same as I described above
I get all the values.

I am using struts.

Am I missing something.

Thanks,
Alok

Khalid Ali
11-18-2003, 05:33 PM
sounds like(I am guessing) form is being submitted without setting up all the values,
try using a setTimeout() function to delay the form submission...
I hope soe one will come up with a beter solution

shukla1_alok
11-18-2003, 06:50 PM
Hi Khalid,

As I explained the things are done in the following sequence.

1. Set the Multiple Selection to TRUE.
2. Iterate through the elements in the LIST and set the Selected attribute for element to true
3. Then I submit the FORM.

What beats me is Same thing I do with alert which is after the first step it works.

Thanks,
Alok