I second the use of qForms for something like this. Even if working on
an existing app, adding qForms take minimal effort. You use a combo of
CF/Javascript to create javascript objects that hold the select box
options. Then, to preselect a value, it would look something like:
objForm.MainSelect.setValue("#MainSelectValue");
objForm.RelatedSelect.setValue("RelatedSelectValue");

Matt


On 10/5/06, Dan Vega <[EMAIL PROTECTED]> wrote:
Thanks for everyone's help. This was an existing application that I was just
trying to make some updates to. I think I need to take some time and just
write the related selects using an Ajax solution.


 On 10/5/06, Lyons, Larry <[EMAIL PROTECTED]> wrote:
>
> It looks like an older version of Nate Weis' 2 selects related custom
> tag.
>
> I'm not sure what you mean when you say you need to use it in an edit
> mode however.
>
> But from what I understand, what you've described is how the tag is
> supposed to work. You first run a query, choosing the columns you want
> displayed. Then you assign names to the selects (Name1, Name2), the
> values taken from the CFQuery columns, and the display names to use as
> well (ie., for the first select values of userID and display using user
> name; and  locations and zipcodes for the names and values for the
> second select box).
>
> What the tag then does is populate some javascript arrays, then uses the
> first array to populate the first dropdown. Then depending on what is
> chosen in the first dropdown, the second one becomes populated based on
> the results of what you choose in the first select box.
>
> Selene Bainum of webtricks.com has a good example and discussion of how
> it works along with some downloadable code:
> http://www.webtricks.com/sourcecode/code.cfm?CodeID=18
>
> For more detailed explanation, just google on related selects.
>
> hth,
> larry
>
> --
> Larry C. Lyons
> Web Analyst
> BEI Resources
> American Type Culture Collection
> http://www.beiresources.org
> email: llyons(at)atcc(dot)org
> tel: 703.365.2700.2678
> --
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On
> Behalf Of Dan Vega
> Sent: Thursday, October 05, 2006 1:14 PM
> To: [email protected]
> Subject: [CFCDEV] TwoSelectsRelated
>
>
>
> I have been using the custom tag two selects related as found below.
>
http://www.arescom.com/Arescom/Arescom_2002/Solutions/CF_TwoSelectsRelat
> ed.html
>
> Has anyone had experience with this tag before. This tag works great but
> when I need to use it in an edit mode I just can not get it to pre
> populate both boxes because the second drop down is built on the fly. If
> anyone can provide some insight It would be greatly appreciated.
>
>
> --
> Dan Vega
> [EMAIL PROTECTED]
> You are subscribed to cfcdev. To unsubscribe, please follow the
> instructions at http://www.cfczone.org/listserv.cfm
>
> CFCDev is supported by:
> Katapult Media, Inc.
> We are cool code geeks looking for fun projects to rock!
> www.katapultmedia.com
>
> An archive of the CFCDev list is available at
> www.mail-archive.com/[email protected]
>
>
> You are subscribed to cfcdev. To unsubscribe, please follow the
instructions at http://www.cfczone.org/listserv.cfm
>
> CFCDev is supported by:
> Katapult Media, Inc.
> We are cool code geeks looking for fun projects to rock!
> www.katapultmedia.com
>
> An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]
>
>



--
Dan Vega
 [EMAIL PROTECTED]
You are subscribed to cfcdev. To unsubscribe, please follow the instructions
at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]


--
Matt Williams
"It's the question that drives us."


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Reply via email to