
13/11/2004, 12:48
|
| | Fecha de Ingreso: noviembre-2004
Mensajes: 14
Antigüedad: 20 años, 6 meses Puntos: 0 | |
lexus el código esta bien pero no se como conectarlo con un recordset, voy a dejar un código pero que tiene problemas cuando tipeas una tecla se pierde el focus del textbox, si se dan cuenta al hacer click en una ciudad se completa el texbox pero me gustaría que esto pasara cuando se le de un tab al textbox
<%
texto=request.querystring("texto")
mensaje=request.form("mensaje")
mensajeRecorrer=mensaje
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.jet.OLEDB.4.0; Data Source=" &Server.MapPath("db1.mdb")
SQL="Select Ciudades from Ciudades where Ciudades like '" & mensaje & "%'"
Set RS=Server.CreateObject("ADODB.RecordSet")
RS.Open SQL,Conn
if texto<>"" then
mensaje=texto
end if%>
<form name="formulario" method="post" action="index.asp">
<input type="text" name="mensaje" value="<%=mensaje%>"
onKeyUp="javascript:document.formulario.submit();" >
</form>
<table width="" border="1" bgcolor="#0000FF">
<%if mensajeRecorrer <> "" then
while not RS.EOF%>
<tr>
<td width="" height="" valign="top" bgcolor="#009900"><a href="index.asp?texto=<%=RS("Ciudades")%>"><%=RS(" Ciudades")%></a></td>
</tr>
<%RS.MoveNext
wend%>
</table>
<%else
mensaje =""
End if
%> |