Squall Leonhart
11-24-2003, 07:04 PM
Hi, guys
I have question about Link tree in Javascript
For example, if you click +sign on the right, it shows child menu below.
+Parent menu -> -Parent menu
Child menu1
Child menu2
Child menu3
Please take a look at code.
<HTML>
<HEAD>
</HEAD>
<BODY LEFTMARGIN=0 MARGINWIDTH="0" MARGINHEIGHT="0">
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsCategory1
Dim rsCategory2
Dim rsCategory3
Dim strSQL1
Dim strSQL2
Dim strSQL3
Set adoCon = Server.CreateObject("ADODB.Connection")
Set rsRequest = Server.CreateObject("ADODB.Recordset")
Set rsTime = Server.CreateObject("ADODB.Recordset")
Set rsCategory1 = Server.CreateObject("ADODB.Recordset")
Set rsCategory2 = Server.CreateObject("ADODB.Recordset")
Set rsCategory3 = Server.CreateObject("ADODB.Recordset")
strSQL1 = "SELECT * FROM tblFAQ WHERE Category= 'Basic Computing/Basic Networking'"
strSQL2 = "SELECT * FROM tblFAQ WHERE Category= 'Security/Advanced Networking/Internet'"
strSQL3 = "SELECT * FROM tblFAQ WHERE Category= 'Internal Application'"
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("tech_re.mdb")
rsCategory1.CursorType = 3
rsCategory2.CursorType = 3
rsCategory3.CursorType = 3
rsCategory1.Open strSQL1, adoCon
rsCategory2.Open strSQL2, adoCon
rsCategory3.Open strSQL3, adoCon
%>
<table width=100%>
<TR>
<TD colspan=2 align=center><FONT FACE=Arial,Helvetica SIZE=2 color=blue><B>FAQs</b></font></td>
</TR>
<TR>
<TD colspan=2 ALIGN=CENTER WIDTH=300><FONT FACE=Arial,Helvetica SIZE=-1 color=blue><i></i></font></td>
</TR>
<TR>
<TD> </td>
</tr>
<TR>
<TD><FONT FACE=Arial,Helvetica SIZE=2 color=black><u>Basic Computing/Basic Networking</u></FONT></TD>
</TR>
<tr>
<td> </td>
</tr>
<% Do while not rsCategory1.eof %>
<TR>
<TD WIDTH="300" ALIGN=left nowrap><A href="<%=rsCategory1("Doc_ID")%>"><B><li><FONT FACE=Arial,Helvetica SIZE=2 color=black><%=rsCategory1("Description")%></font></li></B></A></TD>
</TR>
<% rsCategory1.Movenext
Loop
%>
<tr>
<td> </td>
</tr>
<TR>
<TD><FONT FACE=Arial,Helvetica SIZE=2 color=black><u>Security/Advanced Networking/Internet</u></FONT></TD>
</TR>
<tr>
<td> </td>
</tr>
<% Do while not rsCategory2.eof %>
<TR>
<TD WIDTH="300" ALIGN=left nowrap><A href="<%=rsCategory2("Doc_ID")%>"><li><B><FONT FACE=Arial,Helvetica SIZE=2 color=black><%=rsCategory2("Description")%></font></B></li></A></TD>
</TR>
<% rsCategory2.Movenext
Loop
%>
<tr>
<td> </td>
</tr>
<TR>
<TD><FONT FACE=Arial,Helvetica SIZE=2 color=black><u>Internal Application</u></FONT></TD>
</TR>
<tr>
<td> </td>
</tr>
<% Do while not rsCategory3.eof %>
<TR>
<TD WIDTH="300" ALIGN=left nowrap><A href="<%=rsCategory3("Doc_ID")%>"><B><li><FONT FACE=Arial,Helvetica SIZE=2 color=black><%=rsCategory3("Description")%></font></li></B></A></TD>
</TR>
<% rsCategory3.Movenext
Loop
%>
<TR>
<TD> </td>
</tr>
</table>
<%'Reset server objects
rsCategory1.Close
rsCategory2.Close
rsCategory3.Close
Set rsCategory1 = Nothing
Set rsCategory2 = Nothing
Set rsCategory3 = Nothing
Set adoCon = Nothing
%>
</BODY>
</HTML>
For example,
I want to make content of <% Do while not rsCategory1.eof %>
<TR>
<TD WIDTH="300" ALIGN=left nowrap><A href="<%=rsCategory1("Doc_ID")%>"><B><li><FONT FACE=Arial,Helvetica SIZE=2 color=black><%=rsCategory1("Description")%></font></li></B></A></TD>
</TR>
<% rsCategory1.Movenext
Loop
%>
if I click Basic Computing/Basic Networking
Do you guys know how to create link tree? Thanks
I have question about Link tree in Javascript
For example, if you click +sign on the right, it shows child menu below.
+Parent menu -> -Parent menu
Child menu1
Child menu2
Child menu3
Please take a look at code.
<HTML>
<HEAD>
</HEAD>
<BODY LEFTMARGIN=0 MARGINWIDTH="0" MARGINHEIGHT="0">
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsCategory1
Dim rsCategory2
Dim rsCategory3
Dim strSQL1
Dim strSQL2
Dim strSQL3
Set adoCon = Server.CreateObject("ADODB.Connection")
Set rsRequest = Server.CreateObject("ADODB.Recordset")
Set rsTime = Server.CreateObject("ADODB.Recordset")
Set rsCategory1 = Server.CreateObject("ADODB.Recordset")
Set rsCategory2 = Server.CreateObject("ADODB.Recordset")
Set rsCategory3 = Server.CreateObject("ADODB.Recordset")
strSQL1 = "SELECT * FROM tblFAQ WHERE Category= 'Basic Computing/Basic Networking'"
strSQL2 = "SELECT * FROM tblFAQ WHERE Category= 'Security/Advanced Networking/Internet'"
strSQL3 = "SELECT * FROM tblFAQ WHERE Category= 'Internal Application'"
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("tech_re.mdb")
rsCategory1.CursorType = 3
rsCategory2.CursorType = 3
rsCategory3.CursorType = 3
rsCategory1.Open strSQL1, adoCon
rsCategory2.Open strSQL2, adoCon
rsCategory3.Open strSQL3, adoCon
%>
<table width=100%>
<TR>
<TD colspan=2 align=center><FONT FACE=Arial,Helvetica SIZE=2 color=blue><B>FAQs</b></font></td>
</TR>
<TR>
<TD colspan=2 ALIGN=CENTER WIDTH=300><FONT FACE=Arial,Helvetica SIZE=-1 color=blue><i></i></font></td>
</TR>
<TR>
<TD> </td>
</tr>
<TR>
<TD><FONT FACE=Arial,Helvetica SIZE=2 color=black><u>Basic Computing/Basic Networking</u></FONT></TD>
</TR>
<tr>
<td> </td>
</tr>
<% Do while not rsCategory1.eof %>
<TR>
<TD WIDTH="300" ALIGN=left nowrap><A href="<%=rsCategory1("Doc_ID")%>"><B><li><FONT FACE=Arial,Helvetica SIZE=2 color=black><%=rsCategory1("Description")%></font></li></B></A></TD>
</TR>
<% rsCategory1.Movenext
Loop
%>
<tr>
<td> </td>
</tr>
<TR>
<TD><FONT FACE=Arial,Helvetica SIZE=2 color=black><u>Security/Advanced Networking/Internet</u></FONT></TD>
</TR>
<tr>
<td> </td>
</tr>
<% Do while not rsCategory2.eof %>
<TR>
<TD WIDTH="300" ALIGN=left nowrap><A href="<%=rsCategory2("Doc_ID")%>"><li><B><FONT FACE=Arial,Helvetica SIZE=2 color=black><%=rsCategory2("Description")%></font></B></li></A></TD>
</TR>
<% rsCategory2.Movenext
Loop
%>
<tr>
<td> </td>
</tr>
<TR>
<TD><FONT FACE=Arial,Helvetica SIZE=2 color=black><u>Internal Application</u></FONT></TD>
</TR>
<tr>
<td> </td>
</tr>
<% Do while not rsCategory3.eof %>
<TR>
<TD WIDTH="300" ALIGN=left nowrap><A href="<%=rsCategory3("Doc_ID")%>"><B><li><FONT FACE=Arial,Helvetica SIZE=2 color=black><%=rsCategory3("Description")%></font></li></B></A></TD>
</TR>
<% rsCategory3.Movenext
Loop
%>
<TR>
<TD> </td>
</tr>
</table>
<%'Reset server objects
rsCategory1.Close
rsCategory2.Close
rsCategory3.Close
Set rsCategory1 = Nothing
Set rsCategory2 = Nothing
Set rsCategory3 = Nothing
Set adoCon = Nothing
%>
</BODY>
</HTML>
For example,
I want to make content of <% Do while not rsCategory1.eof %>
<TR>
<TD WIDTH="300" ALIGN=left nowrap><A href="<%=rsCategory1("Doc_ID")%>"><B><li><FONT FACE=Arial,Helvetica SIZE=2 color=black><%=rsCategory1("Description")%></font></li></B></A></TD>
</TR>
<% rsCategory1.Movenext
Loop
%>
if I click Basic Computing/Basic Networking
Do you guys know how to create link tree? Thanks