
16/03/2004, 10:30
|
| | Fecha de Ingreso: marzo-2003 Ubicación: onde toy?
Mensajes: 1.437
Antigüedad: 22 años, 2 meses Puntos: 9 | |
Haber...tengo la siguiente tabla
<table width="100%" height="29">
<!--DWLayoutTable-->
<%
Set Mi_Conexion = Server.CreateObject("ADODB.Connection")
Set Res = Server.CreateObject("ADODB.Recordset")
Mi_Conexion.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\Inetpub\wwwroot\horas\bdd.mdb;"
sql = "SELECT * FROM actividades Where usuario = '"&usuario&"' and año = '"&anno&"' and mes = '"&mes&"' and dia = '"&dia&"' order by hora ASC;"
Res.PageSize = 10
Res.Open sql, Mi_Conexion, 1
If Not Res.Eof Then
Res.AbsolutePage = CLng(Session("Pag_Pro"))
Else
Session("Pag_Pro") = 0
End If
dim n
for n = 1 to Res.PageSize
if Not Res.EOF then%>
<tr>
<%
solicita = res("solicita")
actividad = res("actividad")
glosa = res("glosa")
hora = res("hora")
estado = res("estado")
consul = res("consul")
%>
<td width="69" height="23" align="center" class="borde">
<% if (estado = "Nueva") then %> <img src = "imagenes/newanim.gif">
<% else
response.write(estado) end if%>
<td width="25" align="center" class="cuerpo"> <%response.write(hora)
session("times")=hora%> </td>
<td width="56" align="center" class="cuerpo"> <%response.write(actividad)%> </td>
<td width="166" align="lefth" bgcolor="#F3F3F3" class="cuerpo">
<% Set conexion = Server.CreateObject("ADODB.Connection")
Set Rec = Server.CreateObject("ADODB.Recordset")
conexion.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\Inetpub\wwwroot\horas\horas.mdb;"
sql = "SELECT * FROM usuarios Where rut = '"&solicita&"';"
set rec = Mi_Conexion.Execute(sql)
While Not rec.EOF
nombre = rec("nombre")
apellP = rec("apaterno")
apellM = rec("aMaterno")
response.write(nombre)
response.write(" ")
response.write(apellP)
response.write(" ")
response.write(apellM)
rec.MoveNext
Wend
rec.Close
set rec = nothing
conexion.close
set conexion= nothing
%>
</td>
<td width="107" align="lefth" valign="top" class="cuerpo">
<a href="#?consul=<%=consul%>" onclick="cambio('detalle')">Modificar</a>
<div class= detalle id=detalle
style="Z-INDEX: 1; VISIBILITY: hidden; WIDTH: 205px; POSITION: absolute; height: 67px; left: 453px; top: 133px;">
<form name="form" method="post" action="modactiv.asp?consul=<%=consul%>">
<table width="102%" border="0" bgcolor="#666666">
<tr bgcolor="#666666">
<td colspan="2" class="letras">Datos para Modificar</td>
</tr>
<tr bgcolor="#666666">
<td width="17%" class="letras">Fecha</td>
<td width="59%"> </td>
</tr>
<tr bgcolor="#666666">
<td height="33" class="letras">
Hora </td>
<td><select name="hora" class="input">
<option>08:00</option>
<option>08:30</option>
<option>09:00</option>
<option>09:30</option>
<option>10:00</option>
<option>10:30</option>
<option>11:00</option>
<option>11:30</option>
<option>12:00</option>
<option>12:30</option>
<option>13:00</option>
<option>13:30</option>
<option>14:00</option>
<option>14:30</option>
<option>15:30</option>
<option>16:00</option>
<option>16:30</option>
<option>17:00</option>
<option>17:30</option>
<option>18:00</option>
<option>18:30</option>
</select></td>
</tr>
<tr bgcolor="#666666">
<td colspan="2"><input class="input" type="submit" name="enviar" value="Enviar"></td>
</tr>
</table>
</form>
</div>
| <a class="example" href="imprimir.asp?consul=<%=consul%>">Detalles</a>
</td>
<td width="108" valign="top" class="cuerpo"><%response.write(consul)%></td>
</tr>
<%
If Not Res.Eof then
Res.MoveNext
End If
end if
Next
%>
</table>
en la cual hay una capa oculta con un formulario para modificar datos... si se fijan en el link modificar puse todo eso de la llamada a función.. lo que quiero es pasarle el parametro del registro a la capa...es decir... cada registro tiene un ID ("consul") y ese id quiero pasarselo a la capa para luego actualizar en otra pagina...pero eso es lo que no consigo...es decir, loo consigo..pero solo me pasa el "id" del primer registro...si luego hago click en el "modificar" de otro registro, cuyo id es distinto... me mantiene el del anterior...
__________________ Buena Vida...
Francisco |