Tema: con html
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/05/2009, 22:22
Avatar de a n g e l u s
a n g e l u s
 
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 años, 3 meses
Puntos: 1
Respuesta: con html

hola m1984:

hay no más tu redacción, pero como siempre respondo cosas raras te entendi, jojojo.

la respuesta seria algo asi:


<%
'-----------> PRIMER PASO RECUPERO LOS DATOS GUARDADOS ------------------------------

sqldatosguardados = "select * from tablaqueguardemisdatos where id=1"
set rsdatos = db.execute(sqldatosguardados)
if not rsdatos.eof then
compania_elegida = rsdatos("companiaguardada")
else
compania_elegida = ""
end if




'-----------> SIGUIENTE PASO HACER COINCIDER LOS DATOS CON LOS GUARDADOS -----------
sql = "select compania, id from sltcompania"

on error resume next
set rs = db.execute(sql)

if err <> 0 then
response.write err.description
response.end
else
if not rs.eof then
response.write "<select name=sltCompania class=txtplano style=width:195>"

do while not rs.eof then

if rs("compania") = compania_elegida then
selecciona = "selected"
else
selecciona = ""
end if


response.write "<option value="&rs("id")&" "&selecciona&">"&rs("compania")&"</option>"

rs.movenext
loop
response.write "<select>"


else
response.write "NO ENCONTRADO"
end if
end if
%>
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post