Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Decision Tree in Classic ASP

Posted on 2013-01-25
Medium Priority
Last Modified: 2013-01-29
Team - I need your help again...,

I have multiple SOP's (Standard Operating Procedures) in my process. I need to create a classic asp page (Backend SQL) which will display all the title's of the Projects. Upon clicking any project, it should start displaying the steps in tree form. For every step, you may have 1 or more possible answers and depending upon the answer, next step will be visible in tree format. Hope I was able to articulate what i visualize.

Can someone guide me how to do this in classic asp, with sql backend? This is kind of critical and important for my appraisal. So, i'd really appreciate some good and quick answers.

Question by:davidi1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 54

Accepted Solution

Scott Fell,  EE MVE earned 2000 total points
ID: 38819789
David, there are multiple tree applications.  Are there any that you have used and are familiar with?

Typically, this will be a combination of html, css and maybe javascript/jquery.  

Assume you have static html like below to make it work with your css and js already loaded.
<li>item 1.1</li>
<li>item 2.1
<li>item 2.2</li>
<li>item 2.3</li>
<li>item 2.4</li>
<li>item 3.1</li>

Open in new window

Although I would actually build the html and use one response.write, for easy explanation here is a simple format.  Below will give you a simple menu without a tree.  Assume you have a 2 tables with Topic and SubTopic

Topic has fields, ID and Name
Subtopic has fields ID,TopicID and Name where TopicID is linked to TopicID

<% do until rsTopic.eof%>

Open in new window

Below will give you the html for the tree that should hopefully look like my static sample above.

<% do until rsTopic.eof
    response.write "<li>
    response.write rsTopic("Name")
    rsSubtopic.filter="TopicID='"&rsTopic("ID")&"'"  ' note single quotes  ' "&&" ' "
    if not rsSubtopic.eof then
      response.write "<ul>"
      do until rsSubtopic.eof
         response.write "<li>"&rsSubtopic("Name")&"</li>"
        if rsSubtopic.eof then
             respsonse.write "</ul>"
        end if
    response.write "</li>


Open in new window

From there you use the css and javascript for whichever tree plug in you want.

Author Comment

ID: 38821608
Padas - Thanks for the start. Well, i am clear on the above. infact, I have created a page in similar fashion.

Where am stuck is..,

SQL Structure
Table 1:
SubmissionID (Unique)
Project Title

Table 2:
DetailsID (Unique)
SubmissionID (Foreign key)


i need to have a tree based on the selection of node 2.

for instance,

1. Step 1: Download the data from source application:
         (a) Download Complete
         (b) Issues in Download

if the user clicks (a) it should open another node for step 2 and same goes for (b) as well..,

am kind of at a loss here.., quiet honestly, there's not much time for me on trail/error.

can you suggest any sites which may have a sample code for tree applications with classic asp pls?
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 38822110
It is all in your logic and that is not something you can download or buy.  In your example for a, you would have something like <a href="step2-decision1">  (a) Download Complete</a>.

can you suggest any sites which may have a sample code for tree applications with classic asp pls  Not in classic asp.  However, please check out this project https://github.com/hungrymedia/interactive-decision-tree where you will simply use your classic asp to create multiple xml files (or one using a querystring act as multiple).  From there the project has js/html that will take care of the rest.

Author Closing Comment

ID: 38834064
Thanks for sight Padas

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

604 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