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 53

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 53

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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…
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…
Suggested Courses

770 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