ASP implements tree directory similar to Resource Manager

Source: Internet
Author: User
Tags resource visual studio

Tree-type Catalog display program

Problem Description:

There are often autocorrelation tables in our projects, and if we look at them as a whole, the entire table is presented as a tree-like data structure (it may become a graph for complex situations). When we show this table, edit it, if not in good form, it will appear very clumsy, for this reason, we develop such a tree-shaped structure of the program. In the previous release, we used a recursive algorithm to implement the in our evaluation of this algorithm, we found that the database with thousands of records is no longer competent, so in the new version of the algorithm, we use XML technology, dynamic discovery of data to solve a large amount of data from the server under the embarrassment, At the same time, if the table data structure renders as a diagram, it will go into a dead loop error.

Practical ideas:

1, the initial display shows only the root and level two nodes, the root and two-level nodes at one level

2, click a node, if its child node area object does not exist, then set up the object, while downloading data update data, display all child nodes.

3, each node after the establishment of the same function, such as checking the existence of child nodes, show hidden child nodes and so on

4, Dhtml+xml+asp+css simultaneous use

Technical difficulties:

1, the use of XMLHTTP interface garbled problem:

Because in the ASP output page, the default encoding scheme is not Chinese, then in the client page XMLHTTP interpretation, will be resolved by default solution, so there will be garbled. To do this, we add the following code definition coding scheme on the server side of the ASP page:

Response.CharSet="GB2312"
Response.ContentType="text/html"

2, how to maintain the previous version of the interface style (Class Explorer form):

In the previous release, all the page content is coherent, in the control of the idea of recursion, all the time the interface is relatively friendly, at that time the mechanism in this edition has changed, content is a key issue of multiple synthesis, IMG, span object ID how to determine after verification, in the interface, This version of the interface is difficult to be the same as the first interface, so can only retain a part, but overall, the new interface can also meet the needs

Because here is not good to use the attachment, so can only paste the source code:

---xtree.html------

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT LANGUAGE=javascript src="xtree.js">
</SCRIPT>
<style type="text/css">
<!--
a:link { font-size: 14px; text-decoration: none; color: #0000FF}
a:visited { font-size: 14px; color: #0000FF; text-decoration: none}
a:hover { font-size: 14px; color: #FF0000; background-color: #CCCC99; text-decoration: none}
a:active { font-size: 14px; color: #FFFFFF; background-color: #191970; text-decoration: none}
.item{ font-size:14px}
-->

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.