You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Alawadhi, Mona" <ma...@kpmg.com> on 2003/04/22 23:18:04 UTC

dynamically loading a listbox upon selection from another listbox

Hello,

How can I dynamically refresh my State drop-down box upon the country that
the user selects from the Country drop-down box? For example, if the user
selects "USA", the state listbox should show only the US states. If the user
selects "CANADA", then the state listbox should only show states in Canada,
... and so on. I am getting the states' lists from a database, so, I am
passing a Vector to the jsp. Also, since I am using a struts model in this
web application, I would rather not to use any javascript in my jsp file,
nor an xml file.


Thank you,
Mona


*****************************************************************************
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. 

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter.         
*****************************************************************************


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


Re: dynamically loading a listbox upon selection from another listbox

Posted by JR <jr...@twofeetthick.com>.
If you want something client-side, you'll have to use javascript, DHTML, or
applet .. i.;e. something on the browser.

Server side you would just treat as another Action or different behaviour in
an existing Action.

JR
----- Original Message -----
From: "Alawadhi, Mona" <ma...@kpmg.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Tuesday, April 22, 2003 5:18 PM
Subject: dynamically loading a listbox upon selection from another listbox


> Hello,
>
> How can I dynamically refresh my State drop-down box upon the country that
> the user selects from the Country drop-down box? For example, if the user
> selects "USA", the state listbox should show only the US states. If the
user
> selects "CANADA", then the state listbox should only show states in
Canada,
> ... and so on. I am getting the states' lists from a database, so, I am
> passing a Vector to the jsp. Also, since I am using a struts model in this
> web application, I would rather not to use any javascript in my jsp file,
> nor an xml file.
>
>
> Thank you,
> Mona
>
>
>
****************************************************************************
*
> The information in this email is confidential and may be legally
privileged.
> It is intended solely for the addressee. Access to this email by anyone
else
> is unauthorized.
>
> If you are not the intended recipient, any disclosure, copying,
distribution
> or any action taken or omitted to be taken in reliance on it, is
prohibited
> and may be unlawful. When addressed to our clients any opinions or advice
> contained in this email are subject to the terms and conditions expressed
in
> the governing KPMG client engagement letter.
>
****************************************************************************
*
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


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


Re: dynamically loading a listbox upon selection from another listbox

Posted by Ian Hunter <ih...@hunterweb.net>.
If you don't want to do JavaScript, you have to have an onChange event that
POSTs to an action, and let the action control it.

If you want it dynamic (pretty much standard requirement these days) you
wind up writing an array in JavaScript and dealing with it client side.

----- Original Message -----
From: "Alawadhi, Mona" <ma...@kpmg.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Tuesday, April 22, 2003 5:18 PM
Subject: dynamically loading a listbox upon selection from another listbox


> Hello,
>
> How can I dynamically refresh my State drop-down box upon the country that
> the user selects from the Country drop-down box? For example, if the user
> selects "USA", the state listbox should show only the US states. If the
user
> selects "CANADA", then the state listbox should only show states in
Canada,
> ... and so on. I am getting the states' lists from a database, so, I am
> passing a Vector to the jsp. Also, since I am using a struts model in this
> web application, I would rather not to use any javascript in my jsp file,
> nor an xml file.
>
>
> Thank you,
> Mona
>
>
>
****************************************************************************
*
> The information in this email is confidential and may be legally
privileged.
> It is intended solely for the addressee. Access to this email by anyone
else
> is unauthorized.
>
> If you are not the intended recipient, any disclosure, copying,
distribution
> or any action taken or omitted to be taken in reliance on it, is
prohibited
> and may be unlawful. When addressed to our clients any opinions or advice
> contained in this email are subject to the terms and conditions expressed
in
> the governing KPMG client engagement letter.
>
****************************************************************************
*
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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