You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Cameron Ingram0 <ci...@tampabay.rr.com> on 2001/03/08 03:14:49 UTC

Dynamic selections from Option tag

Hi All,

The scenario is this, I have 2 option boxes I would like to make what is available in the 2nd option box dependent on what is selected in the first option box, is this possible? If not how can I achieve the same affect.

Thanks in advance Cameron Ingram

Re: Dynamic selections from Option tag

Posted by Nick Pellow <ni...@cortexebusiness.com.au>.

> Cameron Ingram0 wrote:
> 
> Hi All,
> 
> The scenario is this, I have 2 option boxes I would like to make what
> is available in the 2nd option box dependent on what is selected in
> the first option box, is this possible? If not how can I achieve the
> same affect.

This is possible, and i believe you have two options for this.

1) write a java script function that changes the values of the second
box after an onchange event of the first.
   You can populate arrays of data using the struts logic:iterate tag.

2) If you have a lot of data, do a post back to the server after the
first box onchange event fires, then resend the page with the second box
populated.

Regards, 
Nick


> 
> Thanks in advance Cameron Ingram