Populate drop down by another drop down

Hi guys,
     Its another question about ColdFusion. Sorry about being a ColdFusion newbie. I need to know how to populate a drop down list from another drop down list. For example, I have a table named Plan that contains uniquely identifying fields Part_Num and Typer (both of which comprise the PK). I want to be able to select a Part_Num from a list (select distinct Part_num from Plan), and have the selection dynamically populate a second drop box (select distinct Typer from Plan where Part_Num = '[ENTER SELECTION CHOSEN FROM FIRST DROP BOX]'). I want to do that within the same page without refreshing the page if possible. Could someone please provide the code to do this? Thanks!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sound like using CF_TwoSelectsRelated custom tag  should work for you.

<CFQUERY NAME="TestSelection" DATASOURCE="yourDataSource">
 SELECT distinct Part_Num,Typer
 FROM Plan
 ORDER BY Part_Num,Typer

<TABLE align="CENTER" width="98%">
<TD align="CENTER" height="100" valign="MIDDLE">
      htmlbetween="</TD><TD ALIGN='CENTER' VALIGN='MIDDLE'>"


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
you can download the free CF_TwoSelectsRelated custom tag using the link below if have not already have the tag.

jl_forumAuthor Commented:
Hi Martin,
    I had actually looked at this tag before submitting my question to EE. I didn't understand what I was supposed to do to this code. It appears to be a template and I just have to fill items in. However, I am unsure of what to do and the "directions" don't make much sense to me. Remember, I'm pretty much a newbie. Can you tell me what to do? Thanks.
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

have a look at the following links

very easy and quick way to set up dynamic drop down lists

Pull down list based on the selection in another pull down list

populate select list based on other list selection
JL - What Coldfusion Version are you using?

If you have V5.0, then the custom tag CF_TWOSELECTSRELATED is already build in for you.  You can use my example above to get you selection works.

If you are using V4.5, then there's a default folder for custom tag   "C:\CFusion\CustomTags" - u'll need to store ur files from the zip file you download from the link above there

jl_forumAuthor Commented:
    I tried pasting your code. All I get is a white screen even though I have it in the custom tags directory and am using Coldfusion MX 6.1 (Trial). Any ideas? I don't see a table or anything on screen....
jl_forumAuthor Commented:
Nevermind.. my mistake! Thanks! It works... however, an error message always appears when I use it. Its a runtime error from IE... it may just be my IE?

A Runtime Error has occured.
Do you wish to Debug?

Error: Object expected

Any ideas? Thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.