Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Decision Tree in Classic ASP

Posted on 2013-01-25
5
Medium Priority
?
852 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 54

Accepted Solution

by:
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.
<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
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)
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 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.
0
 
LVL 2

Author Closing Comment

by:davidi1
ID: 38834064
Thanks for sight Padas
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
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

564 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