
16/06/2008, 13:08
|
 | | | Fecha de Ingreso: diciembre-2006
Mensajes: 248
Antigüedad: 18 años, 3 meses Puntos: 0 | |
Respuesta: formulario con Registro seleccionado (select) ante nada, gracias por la ayuda, es esto lo que dices?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>directorio de enlaces</title>
</head>
<body>
<H3> LISTADO DE TODOS LOS ENLACES </H3>
<hr noshade="noshade" size="1" />
<form name="formi" method="post" action="guardar_enlace.asp">
<input type="hidden" name="cod_enlace" value="<%=cod_enlace%>" >
<table width="100%" border="1">
<tr>
<th width="29%" scope="row"><div align="left">Titulo de la página</div></th>
<td width="71%"><input name="titulo" id="titulo" value="<%=titulo%>" size="70" /></td>
</tr>
<tr>
<th width="29%" scope="row"><div align="left">Enlace URL </div></th>
<td width="71%"><input name="url" id="url" value="<%=url%>" size="70" /></td>
</tr>
<tr>
<th width="29%" scope="row"><div align="left">Descripcion del sitio </div></th>
<td width="71%"><input name="descripcion" id="descripcion" value="<%=descripcion%>" size="70" /></td>
</tr>
<tr>
<th width="29%" scope="row"><div align="left">Apartado donde está e-dinero </div></th>
<td width="71%"><input name="apartado" id="apartado" value="<%=apartado%>" size="70" /></td>
</tr>
<tr>
<th width="29%" scope="row"><div align="left">Categoria actual </div></th>
<td width="71%"><input name="categoria_actual" id="categoria_actual" value="<%=categoria_actual%>" size="70" /></td>
</tr>
<tr>
<th width="29%" scope="row"><div align="left">Modificar categoría </div></th>
<td width="71%">
<%Set con=Server.CreateObject("ADODB.Connection") 'creo objeto connection
con.open "mibasededatos"
Set rs=Server.CreateObject("ADODB.RecordSet") %>
<%SsQL="Select * from cat_enlaces"
set rs = con.Execute(SsQL) %>
<select name="cod_categoria" size="1" id="cod_categoria">
<%
Do While not rs.eof
strSelected = ""
if rs.Fields("cod_cat") =cint(cod_cat) then
strSelected = "selected"
else
strSelected = ""
end if
%>
<option value="<%=rs.Fields("cod_cat") %>"<%=strSelected%>><%=rs("categoria")%></option>
<% rs.movenext
Loop %>
</select>
</td>
</tr>
<tr>
<th width="29%" scope="row"><div align="left">Activo</div></th>
<td width="71%"> <input name="Activo" type="Checkbox" id="Activo" <%=Activo%> size="70" /></td>
</tr>
<tr>
<td colspan="2" align="center">
<input name="Modificar" type="submit" id="Modificar" value="Modificar" />
<input name="cancelar" type="reset" id="cancelar" value="Cancelar" /> </td>
</tr>
</table>
</form>
<% rs.close
con.close
Set rs=nothing
Set con=nothing %>
</body>
</html> |