Advertisement

06.13.2004 at 12:19PM PDT, ID: 21023914
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

Datbase driven drop down menu

Asked by jameswalt in Active Server Pages (ASP)

Tags: , ,

I have an access table:
  ID (primary), title, parentID

This table represents a menu system with submenu capabilities. An implementation could exist as follows:

- Pets
  - Cat
  - Dog
- Cars
  - Mazda
-----------
ID       title        parentID
1       Pets            -1
2       Cars            -1
3       Cat              1
4       Dog             1
5       Mazda          2
-------------

I would like to populate a select list (drop down menu) with a list of categories and subcategories under them. Is there a quick way to do this without using 2 record sets? Please provide the code if possible.


Here's the stuff I have now:


<select name="categoryID" id="categoryID">
<%
      Query = "SELECT * FROM offerCategories"
'the following line executes a query and puts the results in recordSet
      opentable
      do until recordSet.EOF
                   Response.write "<option value=""" & recordSet("ID") & """>"
                   RecordSet.moveNext
      loop
%>
</select>



this creates a drop down list with each of the categories in it, but does not display anything in the hierarchal structure that i desire. I would like for it to look more like this:

: Pets
   : Cat
   : Dog
: Cars
   : Mazda

So there is a special order based on parentID that is created, as well as the potential for multiple levels of submenus. I just need to know an efficient way to do this that doesnt require simutaneous record set traversals.Start Free Trial
 
Keywords: Datbase driven drop down menu
 
Loading Advertisement...
 
[+][-]06.13.2004 at 10:31PM PDT, ID: 11303610

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.14.2004 at 01:04AM PDT, ID: 11304252

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.15.2004 at 07:50AM PDT, ID: 11315830

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.15.2004 at 08:31AM PDT, ID: 11316346

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: down, drop, menu
Sign Up Now!
Solution Provided By: jameswalt
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.15.2004 at 10:48AM PDT, ID: 11317691

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42