[thelist] Re: >> Stupid JS trick > using the double and triple combo boxes

Kevin krr at ix.netcom.com
Thu Aug 9 11:24:58 CDT 2001


> ----- Original Message -----
> From: "Kevin" <krr at ix.netcom.com>
> To: <thelist at lists.evolt.org>
> Sent: Thursday, August 09, 2001 9:20 AM
> Subject: >> Stupid JS trick > using the double and triple combo boxes
>
>
> > > Message: 1
> > > From: Michael Buffington <mike at price.com>
> > > To: "'thelist at lists.evolt.org'" <thelist at lists.evolt.org>
> > > Date: Wed, 8 Aug 2001 17:59:58 -0700
> > > Subject: [thelist] Stupid JS trick
> > > Reply-To: thelist at lists.evolt.org
> > >
> > > I have no doubt that this topic has been extensively covered, but
after
> an
> > > hour or two of searching I've swallowed my pride and am now taking it
to
> > the
> > > list.
> > >
> > > I have a form, with several select elements. The select elements are
> > > populated by individual ColdFusion queries (which probably isn't that
> > > relevant).
> > >
> > > I need the select elements to show dynamic values based on the
> selections
> > of
> > > the other select elements, using JavaScript to avoid a refresh.
> > >
> > > So if the user selects CA in select box 1, select box 2 should only
show
> > > cities unique to california. It also needs to go the other direction -
> if
> > > the user leaves select box 1 blank, but selects a city, the state for
> that
> > > city should be selected.
> > >
> > > I understand that giving each select element the ability to be a child
> or
> > a
> > > parent could get pretty complex, and that strict parent/child
> > relationships
> > > are simpler. I'm having a difficult time with both, so I'll take what
I
> > can
> > > get.
> > >
> > > If anyone has any examples or how-to's I'd really appreciate it.
> > >
> > > Michael Buffington
> > > http://www.michaelbuffington.com
> > > mike at stompzine.com
> > > cell. (714) 404-8616
> > > home. (949) 457-2247
> >
> > Web Abstract has several to choose from
> >
> > This first is the triple combo box
> > http://www.wsabstract.com/script/script2/triplecombo.shtml
> > shows an example in action and the code is cut and paste
> >
> > The second is the double combo
> > http://www.wsabstract.com/script/cut183.shtml
> > and again it shows the example in action
> >
> > Kevin
> >
>
> Another thought that just occured to me is that you could run the entire
> script from an external JS file and build that file using your coldfusion
> queries. Using the tutorial to setup the script and Coldfusion to
> dynamically build the arrays. Have never seen an example of this but
> everytime I have to build an array by hand I have to restrain myself. Hand
> built arrays are the pits!
>
> Kevin
>





More information about the thelist mailing list