Tree Catalog Show Program Problem Description: In our project, the self-associated data table, if we look from the whole, the entire table is presented as a tree data structure (for complex situations, it may become a picture ). When we show this table, when we do not use a good expression, it will be very awkward. To this end, we develop such a tree structure. In the previous version, we used the recursive algorithm to achieve, and we found that there is no longer competent for the database that has thousands of records, so in the new algorithm version, we Using XML technology, dynamic discovery data to solve the embarrassment of a large amount of data from the server, while also spread, if the table data structure is presented as a picture, it will enter the dead cycle error.
Actual idea: 1. Only the root and secondary nodes are displayed, the root and the secondary node are displayed at a level 2. Click on a node. If its child node area object does not exist, the object is established, and the data update data is downloaded. Display all subtots. 3, each node has the same function after the establishment, such as checking the child node, showing hidden child nodes, etc. 4, DHTML XML ASP CSS simultaneously using technical difficulties: 1. Working code when using XMLHTTP interface : Because the default encoding scheme is not Chinese in the ASP output page, then in the XMLHTTP of the client page, it will be garbled in the default scheme. To do this, we join the following code definition encoding scheme in the ASP page of the Server end: response.charset = "gb2312" response.contentType = "text / html"
2, how to maintain the last version of the style (class resource manager form) on the interface: In the previous version, all the page content is uncomfortable. In the control, recuperate and other ideas, all the interface is relatively friendly, At that time, the mechanism in this edition changed, and the content is a key issue of multiple synthesis. How IMG, SPAN object ID determines the verification, on the interface, the interface of this version is difficult to be the same as the first interface, so it can only be retained Part, but in general, the new interface can also meet the needs
Because it is not good here, you can only post source code:
--- xtree.html -------------------------------------------------------------------------------------------------------------------------------------------------- -----------------------