You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Neil Meyer <ne...@cxchange.co.za> on 2005/11/02 14:25:37 UTC

Struts dropdown boxes

Hi,

I need to have 2 dropdown boxes on my jsp page. The first dropdowns selected
value will determine what is pulled from the database for the second
dropdown.

I know there is a few ways of doing it but would like to know what most of
the people recommend doing this.

Your help is really appreciated.

Regards
Neil Meyer

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts dropdown boxes

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Hi Neil,

If your app can tolerate Javascript (i.e., require it), then Ajax is
probably your best bet.  Take a look here:

http://sourceforge.net/projects/javawebparts/

Grab a copy of the JWPCookbook.  In it is a recipe called Dynamic
Double-Select, which is exactly what you want.  You should be able to take
that example as-is and use it in your own app without much trouble.

If your are Javascript-averse though, your only real choice is a two-step
approach, i.e., show the page with the first dropdown and a button which
submits the form.  Then display the page with the second dropdown and two
buttons, one to continue on and one to go back and select another option
from the first.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com

On Wed, November 2, 2005 8:25 am, Neil Meyer said:
> Hi,
>
> I need to have 2 dropdown boxes on my jsp page. The first dropdowns
> selected
> value will determine what is pulled from the database for the second
> dropdown.
>
> I know there is a few ways of doing it but would like to know what most of
> the people recommend doing this.
>
> Your help is really appreciated.
>
> Regards
> Neil Meyer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org