Foros del Web » Programando para Internet » ASP Clásico »

codigo tremenu

Estas en el tema de codigo tremenu en el foro de ASP Clásico en Foros del Web. necesito una ayuda : utilizo dreamweaver para programar con asp y me dieron un codigo para crear un arbol dinamico de menus. el problema que ...
  #1 (permalink)  
Antiguo 08/08/2007, 02:34
 
Fecha de Ingreso: abril-2002
Mensajes: 68
Antigüedad: 22 años, 2 meses
Puntos: 0
codigo tremenu

necesito una ayuda : utilizo dreamweaver para programar con asp y me dieron un codigo para crear un arbol dinamico de menus. el problema que tengo es que no se como utilizarlo con las conexiones que realiza el dreamweaver. Alguien puede ayudarme ??

el codigo que me dieron
Código:
<%
Call DoTree(0,0)

'here we initially call the sub routine, we pass 0 as the parent ID 
'this will pull all top level parent (meaning they don't have an 'ancestor). 
'we also pass 0 for the level, this is used for spacing, or
'making the results appear threaded. 
'---------------------------------------------------------- 
Sub DoTree(ParentID, intLevel)
Set DBConn = Server.CreateObject("ADODB.Connection")
DBConn.Open var_cadena_de_conexion

Dim SQLQ, DBConn, rs, i
SQLQ = "SELECT RecordID, DisplayName FROM RECORDS " & _ 
"WHERE ParentID = " & ParentID & " ORDER BY DisplayName ASC"
Set rs = DBConn.Execute(SQLQ) 
If Not rs.EOF Then 
Do Until rs.EOF 
' Response.Write "<img src=Spacer.gif Width= " & _
' 15 * intLevel & ">" 
Response.Write Replace(Space(intLevel), " ", "&nbsp;&nbsp;&nbsp;&nbsp;")
Response.Write rs("DisplayName") & "<br>" 
'now call the subroutine we're in to see if this value has 
'any children and increase the indent, and so on... 
DoTree rs("RecordID"), intLevel + 1 
rs.MoveNext 
Loop 
End If 
rs.Close 
Set rs = Nothing 

DBConn.Close 
Set DBConn= Nothing 

End Sub 
'------------------------------------------------------------ 
%>
__________________
Lordztein
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:10.