Ver Mensaje Individual
  #5 (permalink)  
Antiguo 05/11/2003, 07:11
haven
 
Fecha de Ingreso: febrero-2002
Ubicación: Navarra
Mensajes: 701
Antigüedad: 23 años, 3 meses
Puntos: 2
Como no Alberto, aqui esta el codigo, pongo lo que hay dentro del body, pero por encima de esto solo estan las clases y el codigo para cambiar las celdas de color, nada más. Si pongo los recorsets todos seguidos, entonces no me muestra nada de la página.

Puedes ver el ejemplo del menu aquí:

Menu

Un saludo


<body>
<table width="60" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5"><img src="../imagenes/fondos/px.gif" width="5" height="5"></td>
<td width="43">
<%

'Aqui empieza el menu
set Conn=Server.CreateObject("ADODB.Connection")
set rs12=Server.CreateObject("ADODB.Recordset")
set rs31=Server.CreateObject("ADODB.Recordset")
set rs61=Server.CreateObject("ADODB.Recordset")
set rs71=Server.CreateObject("ADODB.Recordset")
set rs111=Server.CreateObject("ADODB.Recordset")
set rs11=Server.CreateObject("ADODB.Recordset")
set rs5=Server.CreateObject("ADODB.Recordset")
set rs747=Server.CreateObject("ADODB.Recordset")
set rs647=Server.CreateObject("ADODB.Recordset")

strAccessDB = "../listas/basedatos"
Conn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath(strAccessDB)


SQL12="SELECT * FROM PRODUCTOS where SUBID = 0"

rs12.Open SQL12, Conn

while not rs12.EOF

%>
<table width="60" border="0" cellpadding="0" cellspacing="0" id="<%=rs12("ID")%>">
<tr>
<td onMouseOver="MM_showHideLayers('Layer1','','hide') "> <div id="<%=rs12.Fields("NOMBRE")%>" style="position:absolute; width:100px; height:15px; left: 88px; z-index: 4; background-color: #<%=rs12.Fields("COLORCAPA")%>; layer-background-color: #FFFFFF; border: 1px none #000000; top: 135px; visibility: hidden;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<%

SQL31="SELECT * FROM PRODUCTOS where SUBID = " &rs12("ID")
rs31.Open SQL31, Conn

while not rs31.EOF
%>
<table width="100" height="10" border="0" cellpadding="0" cellspacing="0" class="cuadro">
<tr>
<td height="10"> <table width="100" height="10" border="0" cellpadding="0" cellspacing="0" id="<%=rs31("ID")%>">
<tr>
<td height="5" valign="bottom" > <div id="<%=rs31.Fields("NOMBRE")%>" style="position:absolute; width:100px; height:25px; z-index:3; left: 97px; visibility: hidden;">
<%

SQL61="SELECT * FROM PRODUCTOS where SUBID = " &rs31("ID")
rs61.Open SQL61, Conn
n=1
while not rs61.EOF
n=n +1
%>
<table width="100" border="0" cellpadding="0" cellspacing="0" bgcolor="<%=rs12.Fields("COLORABAJO")%>" class="cuadro" id="<%=rs61("ID")%>">
<tr>
<td width="100" height="5" valign="middle" ><a href="productos2.asp?ID=<%=rs61("ID")%>&Categ=<%=r s61("SUBID")%>&N=1&CategID=<%=rs61("CATEGORIA")%>" onmouseover="cambiaFondo('<%=rs61("ID")%>','<%=rs6 1("COLORCAPA")%>');MM_showHideLayers('<%=rs61.Fiel ds("NOMBRE")%>1','','show');this.style.color='<%=r s61("COLORTEXTO")%>'" onmouseout="cambiaFondo('<%=rs61("ID")%>','<%=rs12 .Fields("COLORABAJO")%>');this.style.color=''" class="<%=rs61.Fields("ID")%>">&nbsp;<%=rs61("NOMB RE")%></a>
<div id="<%=rs61.Fields("NOMBRE")%>1" style="position:absolute; width:175px; height:25; z-index:4; left: 100px; visibility: hidden;">
<%

SQL71="SELECT * FROM PRODUCTOS where SUBID = " &rs61("ID")
rs71.Open SQL71, Conn
n=1
while not rs71.EOF
n=n +1
%>
<table width="175" border="0" cellpadding="0" cellspacing="0" bgcolor="<%=rs12.Fields("COLORABAJO")%>" class="cuadro" id="<%=rs71("ID")%>">
<tr>
<td width="175" height="5" valign="middle" ><a href="productos2.asp?ID=<%=rs71("ID")%>&Categ=<%=r s71("SUBID")%>&N=1&CategID=<%=rs71("CATEGORIA")%>" onmouseover="cambiaFondo('<%=rs71("ID")%>','<%=rs7 1("COLORCAPA")%>')" onmouseout="cambiaFondo('<%=rs71("ID")%>','<%=rs12 .Fields("COLORABAJO")%>')" class="<%=rs61.Fields("ID")%>">&nbsp;<%=rs71("NOMB RE")%></a>
</td>
</tr>
</table>
<%
rs71.MoveNext
wend
%>
</div></td>
</tr>
<tr>
<td height="2" valign="middle"><img src="../imagenes/fondos/px.gif" width="100%" height="2" onMouseOver="

<%

SQL111="SELECT * FROM PRODUCTOS where SUBID = " &rs31("ID")
rs111.Open SQL111, Conn

while not rs111.EOF %>

ocultaCapa('<%=rs111.Fields("NOMBRE")%>1');

<%rs111.MoveNext
wend%>"></td>
</tr>
</table>
<%
rs61.MoveNext
wend
%>
</div>
<!--'productos3.asp?ID=<%'=rs12("ID")%>&N=1&Categ=<%'= rs31("NOMBRE")%>&CategID=<%'=rs12("ID")%>" class="<%'=replace(rs12.Fields("NOMBRE")," ","_")%>-->
<a href="javascript:;" onMouseOver="MM_showHideLayers('<%=rs31.Fields("NO MBRE")%>','','show');cambiaFondo('<%=rs31("ID")%>' ,'<%=rs12("COLORSOBRE")%>');this.style.color='<%=r s31("COLORTEXTO")%>'" onmouseout="cambiaFondo('<%=rs31("ID")%>','<%=rs12 .Fields("COLORCAPA")%>');this.style.color=''" class="<%=rs12.Fields("ID")%>">&nbsp;<%=rs31.Field s("NOMBRE")%></a>
</td>
</tr>
<tr>
<td height="2"><img src="../imagenes/fondos/px.gif" width="100%" height="2" onMouseOver="

<%

SQL11="SELECT * FROM PRODUCTOS where SUBID = " &rs12("ID")
rs11.Open SQL11, Conn

while not rs11.EOF %>

ocultaCapa('<%=rs11.Fields("NOMBRE")%>');

<%rs11.MoveNext
wend%>"></td>
</tr>
</table></td>
</tr>
</table>
<a href="javascript:;" class="menuarriba"></a><a href="javascript:;" onMouseOver="MM_showHideLayers('<%=rs31.Fields("NO MBRE")%>','','show')"></a>
<%
rs31.MoveNext
wend
%>
</td>
</tr>
</table>
</div>
<%

response.write "<a href='productos2.asp?ID="&rs12("ID")&"&N=1&Categ=" &rs12("NOMBRE")&"&CategID="&rs12("ID")&"' class=menucolor2 onmouseover=""cambiaFondo('"&rs12("ID")&"','#CDE3E 6')"" onmouseout=""cambiaFondo('"&rs12("ID")&"','')""><d iv align=right onMouseOver=""MM_showHideLayers('"&rs12.Fields("NO MBRE")&"','','show')"">"&rs12.Fields("NOMBRE")& "</div></a>"
%>
</td>
</tr>
<tr>
<td><img src="../imagenes/fondos/px.gif" width="100%" height="10" onMouseOver="<%


SQL5="SELECT * FROM PRODUCTOS where SUBID = 0"
rs5.Open SQL5, Conn

while not rs5.EOF


SQL747="SELECT * FROM PRODUCTOS where SUBID = " &rs5("ID")
rs747.Open SQL747, Conn
%>

ocultaCapa('<%=rs5.Fields("NOMBRE")%>');

<%while not rs747.EOF%>

ocultaCapa('<%=rs747.Fields("NOMBRE")%>');

<%

SQL647="SELECT * FROM PRODUCTOS where SUBID = " &rs747("ID")
rs647.Open SQL647, Conn
%>
<%while not rs647.EOF%>

ocultaCapa('<%=rs647.Fields("NOMBRE")%>1');

<%rs647.MoveNext
wend%>

<%rs747.MoveNext
wend%>

<%rs5.MoveNext
wend

'limpiamos objetos

rs747.Close
rs647.Close
set rs647=nothing
set rs747=nothing
%>"></td>
</tr>
</table>
<%
rs12.MoveNext
wend%>
</td>
</tr>
</table>
<%'cerramos los elementos
rs12.Close
set rs12=nothing
rs31.Close
set rs31=nothing
rs61.Close
set rs61=nothing
rs11.Close
set rs11=nothing
rs5.Close
set rs5=nothing

'Aqui termina el menu
%>
</body>

Un saludo
__________________
asp, php, .net, adaptandose a las necesidades

Última edición por haven; 05/11/2003 a las 07:20