<!--
See a forum where someone sent a tree-type menu, the need for a lot of people, looked at the demo,
Seems not difficult to achieve, while Saturday is OK, then also wrote a
Theoretically support Unlimited class classification, send up to share with you!!
'--------------------------
Name: Infinite-level category tree Menu demo
Author: y0h
Last Updated: 2004-09-19 22:40
Environment: Asp+access
'//----------List table definition
' Create Table List (ID autoincrement,parentid long,title text, Url text (), Flag bit,childnum long,target text (10))
'--------------------------
-->
<style type=text/css>
body,td{font-size:13px;}
a:link {color: #442200; Text-decoration:none}
a:visited {color: #444400; Text-decoration:none}
a:hover {color: #442200; text-decoration:underline overline; Background-color: #FFFF00}
A.link1:link {color: #FF0000; Text-decoration:none}
a.link1:visited {color: #FF0000; Text-decoration:none}
a.link1:hover {color: #FF0000; text-decoration:none; Background-color: #eeeeee}
</Style>
<!--Someone asked the different styles of different links on the same page. How do you do that?-->
<!--add Node form-->
<div align= "center" id=load style= "Display:none;position:absolute;" >
<table bgcolor=ffffee width=250 style= "border:1px solid #dd8888;" ><form method=post action= "" name=form1>
<TR><TD align= "center" > Add Nodes </td></tr>
<TR><TD align= "center" >
<input type= "hidden" name= "ParentID" >
Title: <input type= "text" name= "title" ><BR>
Links: <input type= "text" name= "URL" ><BR>
Target: <input type= "text" name= "target" style= "width:70px" >
<select name= "" style= "width:75px" onchange= "Javascript:target.value=this.options[this.selectedindex].value;" >
<!--someone asked to change the value of a text box with a drop-down list. What do you mean, here it is.-->
<option value= "" >Default</option>
<option value= "right" >Right</option>
<option value= "_black" >_black</option>
<option value= "_top" >_Top</option>
<option value= "_parent" >_parent</option>
<option value= "_self" >_self</option>
</SELECT>
</TD></TR><TR><TD align= "center" >
<input type= "Submit" Name= "submitted" value= "Submit" >
<input type= "button" onclick= "javascript:load.style.display= ' None '" value= "Cancel" >
</TD>
</TR></FORM>
</TABLE>
</div>
<!--add node form end-->
<%
' Connect to the database
Set Conn=server.createobject ("ADODB. Connection ")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" &server.mappath ("File.mdb")
'//----------Operations Branch
Action=request ("Action")
Select Case Action
Case "Add": If Request ("ParentID") <> "" Then add
Case "Del": Del
Case "OPEN": Open
Case Else:
End Select
'//----------display list
Public List
Set Rs=conn.execute ("select * from [List]")
If not rs.eof Then
List =rs.getrows
Max=conn.execute ("Select Count (ParentID) from List Where parentid=0") (0)
Set rs=nothing
Set conn=nothing
Checklist 0,max, ""
Else
Set rs=nothing
Set conn=nothing
End If
Response.Write "<a href=# +id;} Someone ask delete confirm how to do that is here
-->
</SCRIPT>
No landscaping, no additional functions, the need to be able to change their own well!
Create Table List (ID autoincrement,parentid long,title text), Url text (x), Flag bit,childnum long,target text (10))
Execute directly in the query to get the list table!!
The following is a description of the table
Id Auto Number
ParentID Long Plastic
Title text
URL text
Flag Boolean
Childnum Long Plastic
Target text, allowing null string