Hi All, We use a similar method to do this, but don't hard-code the javascript arrays in the page.
We have a set of database tables that hold all reference codes, a seperate table that holds descriptions (to allow multi-language descriptions), and a third table to hold relationships between reference codes. All reference codes are keyed via a ReferenceTypeCode and a ReferenceCode (eg. COUNTRY,AU) - Relationships are keyed by a Relationship type code as well as parent and child RefTypeCodes and RefCodes - eg. COUNTRY_CURRENCY,COUNTRY,AU,CURRENCY,AUD (note - using this approach you can start with something that is readable, then shorten/encode them for production usage to minimise space wastage). We then have a JSP tag that generates the JavaScript arrays passing as parameters to this tag the RefTypeCodes and appropriate RltshpTypeCodes - the javascript routines then use this naming standard with the eval() function to perform the dependant load. This gets around all hard-coded description / array problems. The only issues are with Netscape - you need to ensure that all of your SELECT lists are default loaded with the number of OPTION items you would like to see on the screen, as if you start them empty then Netscape will not create a working dropdown.. Hope this is of some help, Regards, Don Elliott www.i4-talent.com ----- Original Message ----- Hi all, We are also using the same approach to populate the dropdowns and list/selects. I don't see anything wrong in that approach. The only difference is we don't use an iframe. Instead we open a new child window to populate. Thanks Ryan Norman ----- Original Message ----- From: "Emerson Cargnin - MSA" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Friday, May 10, 2002 02:45 PM Subject: approache to populate combo-box on the fly > Hi all > > We are using the following approache to populate a combo-box depending on > the value of a changed combo-box : > > We have a iframe on the page, and on the onChange event of some combo-box, > it loads an struts LoadSelectAction (generic for all cases like this) that > populates other combo depending of some parameters. > > Is it a good practice? have anyone used other way to populate a combo > without sending the entire page to server and flicking the page? > > Emerson > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

