freelanceprogrammers.org Forum Index » Cold Fusion
Drop Down Box from 2 queries
Joined: 31 Aug 2005
Posts: 2
Drop Down Box from 2 queries
I am new to ColdFusion. I am developing a form that displays a record
that can be viewed or edited. I am trying to populate a drop down box
with a query from a secondary table (I will call it "People".)
However, I want the value highlighted in the list to be the value of
the primary table`s queried record`s "person" field. (In Access, the
secondary table was used to populate the "person" field in the primary
table.) I can successfully display the list from the secondary table
field. And, I can display only the value from the desired record.
How do I display the desired record value as the option value with the
other options from the 2nd table (People), so that the field can be
edited, if needed?
Jan
Joined: 02 Apr 2005
Posts: 20
Drop Down Box from 2 queries
It sounds like you want to populate a second select box based on the current
selection of a first one. If so:
Go to MM`s developer exchange at:
http://www.macromedia.com/cfusion/exchange/index.cfm
Search for "Two Selects Related" in the Cold Fusion exchange.
Mark Gregory
----- Original Message -----
From: "dhncanoe" <dhncanoe@...>
To: <cold_fusion@yahoogroups.com>
Sent: Tuesday, August 30, 2005 6:13 PM
Subject: [cold_fusion] Drop Down Box from 2 queries
> I am new to ColdFusion. I am developing a form that displays a record
> that can be viewed or edited. I am trying to populate a drop down box
> with a query from a secondary table (I will call it "People".)
> However, I want the value highlighted in the list to be the value of
> the primary table`s queried record`s "person" field. (In Access, the
> secondary table was used to populate the "person" field in the primary
> table.) I can successfully display the list from the secondary table
> field. And, I can display only the value from the desired record.
> How do I display the desired record value as the option value with the
> other options from the 2nd table (People), so that the field can be
> edited, if needed?
>
> Jan
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
Joined: 31 Aug 2005
Posts: 2
Drop Down Box from 2 queries
Mark,
Is the use of 2 boxes the only way to do this? I really wanted 1
box with the fill list populated from the query of the 2nd table and
the highlighted option value = to the record value in the displayed
form record queried from the 1st or master table.
Jan Gregory Willis
--- In cold_fusion@yahoogroups.com, "YahooDude" <yahoodude@s...>
wrote:
> It sounds like you want to populate a second select box based on
the current
> selection of a first one. If so:
>
> Go to MM`s developer exchange at:
> http://www.macromedia.com/cfusion/exchange/index.cfm
> Search for "Two Selects Related" in the Cold Fusion exchange.
>
>
>
> Mark Gregory
>
>
> ----- Original Message -----
> From: "dhncanoe" <dhncanoe@g...>
> To: <cold_fusion@yahoogroups.com>
> Sent: Tuesday, August 30, 2005 6:13 PM
> Subject: [cold_fusion] Drop Down Box from 2 queries
>
>
> > I am new to ColdFusion. I am developing a form that displays a
record
> > that can be viewed or edited. I am trying to populate a drop
down box
> > with a query from a secondary table (I will call it "People".)
> > However, I want the value highlighted in the list to be the
value of
> > the primary table`s queried record`s "person" field. (In
Access, the
> > secondary table was used to populate the "person" field in the
primary
> > table.) I can successfully display the list from the secondary
table
> > field. And, I can display only the value from the desired
record.
> > How do I display the desired record value as the option value
with the
> > other options from the 2nd table (People), so that the field can
be
> > edited, if needed?
> >
> > Jan
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
Joined: 02 Apr 2005
Posts: 20
Drop Down Box from 2 queries
Not really I don`t think. That tag basically runs two queries then uses some
JavaScript to populate a second element based on the selection in the first.
You could probably toy around with it some to change the elements. I`m not
really a JavaScript hero though, so that`s about all I can tell you.
MG
----- Original Message -----
From: "dhncanoe" <dhncanoe@...>
To: <cold_fusion@yahoogroups.com>
Sent: Wednesday, August 31, 2005 12:55 PM
Subject: [cold_fusion] Re: Drop Down Box from 2 queries
> Mark,
> Is the use of 2 boxes the only way to do this? I really wanted 1
> box with the fill list populated from the query of the 2nd table and
> the highlighted option value = to the record value in the displayed
> form record queried from the 1st or master table.
> Jan Gregory Willis
>
>
> --- In cold_fusion@yahoogroups.com, "YahooDude" <yahoodude@s...>
> wrote:
> > It sounds like you want to populate a second select box based on
> the current
> > selection of a first one. If so:
> >
> > Go to MM`s developer exchange at:
> > http://www.macromedia.com/cfusion/exchange/index.cfm
> > Search for "Two Selects Related" in the Cold Fusion exchange.
> >
> >
> >
> > Mark Gregory
> >
> >
> > ----- Original Message -----
> > From: "dhncanoe" <dhncanoe@g...>
> > To: <cold_fusion@yahoogroups.com>
> > Sent: Tuesday, August 30, 2005 6:13 PM
> > Subject: [cold_fusion] Drop Down Box from 2 queries
> >
> >
> > > I am new to ColdFusion. I am developing a form that displays a
> record
> > > that can be viewed or edited. I am trying to populate a drop
> down box
> > > with a query from a secondary table (I will call it "People".)
> > > However, I want the value highlighted in the list to be the
> value of
> > > the primary table`s queried record`s "person" field. (In
> Access, the
> > > secondary table was used to populate the "person" field in the
> primary
> > > table.) I can successfully display the list from the secondary
> table
> > > field. And, I can display only the value from the desired
> record.
> > > How do I display the desired record value as the option value
> with the
> > > other options from the 2nd table (People), so that the field can
> be
> > > edited, if needed?
> > >
> > > Jan
> > >
> > >
> > >
> > >
> > >
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> > >
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







