Under Menu med While og Wend
Problem: Skal have lagt en undermenu til en undermenu ind. Koden virker uden fejl, MEN den kalder bare ikke tekste fra databasen frem ?Har været inde i data basen og se om mine Parent & Child værdier er korrekte.
Alle If og End If er tilstede.
****************************************************************
Function VisMenuLinierne()
If Request.QueryString("MenuID") = "" Then
%> <tr>
<td colspan="2" height="50" class="TextFelt3"> </td>
</tr>
<% Else
Set rstSimple = cnnSimple.Execute("SELECT * FROM Menu Where ParentID = " & Request.QueryString("MenuID") & " ORDER By MenuID")
While Not rstSimple.EOF
%> <tr>
<td height="20" colspan="2" class="MenuSystem"> <% VisArrowMenu() %><a href="<%= rstSimple.Fields("MenuLink").Value %>"><b> <%= rstSimple.Fields("MenuNavn").Value %></b></a></td>
</tr>
<%
If Request.QueryString("SubID") Then
Set rstSimple2 = cnnSimple.Execute("SELECT * FROM Menu Where ParentID = " & Request.QueryString("SubID") & " ORDER By MenuID")
While Not rstSimple2.EOF
If CINT( Request.QueryString("SubID") ) = CINT ( rstSimple.Fields("MenuID").Value ) Then
%> <tr>
<td background="/system/Sub.jpg" width="16%"> </td><td class="MenuSystem"><a href="<%= rstSimple2.Fields("MenuLink").Value %>"><%= rstSimple2.Fields("MenuNavn").Value %></a></td>
</tr>
<%
If Request.QueryString("UnID") Then
Set rstSimple3 = cnnSimple.Execute("SELECT * FROM Menu Where ParentID = " & Request.QueryString("UnID") & " ORDER By MenuID")
While Not rstSimple3.EOF
If CINT( Request.QueryString("UnID") ) = CINT ( rstSimple.Fields("MenuID").Value ) Then
%> <tr>
<td background="/system/Sub.jpg" width="16%"> </td><td class="MenuSystem"><a href="<%= rstSimple3.Fields("MenuLink").Value %>"><%= rstSimple3.Fields("MenuNavn").Value %></a></td>
</tr>
<% End If
rstSimple3.MoveNext
Wend
rstSimple3.Close
Set rstSimple3 = Nothing
End If
End If
rstSimple2.MoveNext
Wend
rstSimple2.Close
Set rstSimple2 = Nothing
End If
rstSimple.MoveNext
Wend
rstSimple.Close
cnnSimple.Close
Set cnnSimple = Nothing
Set rstSimple = Nothing
End If
End Function
*****************************************************************
