Solved

Decision Tree in Classic ASP

Posted on 2013-01-25
5
772 Views
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.

Thanks,
David
0
Comment
Question by:davidi1
  • 3
  • 2
5 Comments
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
Comment Utility
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.
<ul>
<li>item 1.1</li>
<li>item 2.1
<ul>
<li>item 2.2</li>
<li>item 2.3</li>
<li>item 2.4</li>
</ul>
</li>
<li>item 3.1</li>
</ul>

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

<ul>
<% do until rsTopic.eof%>
<li><%=rsTopic("Name")%></li>
<%
rsTopic.movenext
loop
%>
</ul>

Open in new window


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

<ul>
<% 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>"
       rsSubtopic.movenext
        if rsSubtopic.eof then
             respsonse.write "</ul>"
        end if
      loop
    response.write "</li>

rsTopic.movenext
loop
%>
</ul>

Open in new window


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

Author Comment

by:davidi1
Comment Utility
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)
SubmitterName
Project Title
Header(Node1)

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

etc..,

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?
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
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.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
0
 
LVL 2

Author Closing Comment

by:davidi1
Comment Utility
Thanks for sight Padas
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

743 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

14 Experts available now in Live!

Get 1:1 Help Now