Populating second drop menu using the selection in the first drop menu

Posted on 2006-04-15
Last Modified: 2010-04-25
Hi all, I'm new at this web programming and I'm doing ASP with Dreamweaver which is making my life a lot easier. I'm trying to populate a second drop down menu from the database table using the selection from the first drop down menu. I'm hoping there's a way to do this without reloading the page (some Javascript perhaps), but I'm not picky, any solution that works I can live with!

My DB has two related tables, the Category and Subcategory tables. (tblCat and tblSubCat)

the fields in tblCat are: CatID , CatName
the fields in tblSubCat are: SubCatID  , SubCatName , Category

As you can see tblSubCat.Category and tblCat.CatID are relating the two tables.

Now first drop menu is populated from tblCat using the CatName as options and passing CatID as values.
I want to get the second DropMenu to be populated with only the SubCatName values where tblSubCat.Category = tblCat.CatID

Question by:axa905
    1 Comment
    LVL 70

    Accepted Solution

    Hi axa905,

    You can certainly do this with DW or by hand-coding.  A bunch of people ask for this and the DW developer community has created a number of extension that take much of the work out of it for you.  Here are links to a few:

    and so on.  None of the above are free, but if you have more time than money, you can try one of the previous solutions from here:

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Suggested Solutions

    For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
    This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
    This video discusses moving either the default database or any database to a new volume.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now