Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/07/2002, 08:12
darts501
 
Fecha de Ingreso: julio-2002
Mensajes: 16
Antigüedad: 22 años, 9 meses
Puntos: 0
buscador asp en un fichero de texto

Hola tengo un buscador en asp, que me busca en un archivo de texto, hasta hay todo bien,lo que me gustaria es que al encontrar los resultados, y pinchar sobre ellos , se me abran con un tamaño de hoja (alto y ancho)que yo le diga.
Set fso = CreateObject("Scripting.FileSystemObject&quot ;)
Set fichero = fso.OpenTextFile(BaseFile, ForReading, True)

if Respuesta = "Solo titulos" then
While not fichero.AtEndOfStream
linea=fichero.readline
If InStr(1,linea,Busqueda,1)<>0 Then
Esta = 1
Encontrado=1
posicion = InStr(1,linea,":",1)
nombre = mid(linea,1,posicion -1) & ".htm"
response.write "<p><H5><a target=" & nombre & " href=" & Procedures & nombre & ">" & linea & "</a></H5>"
end if
wend
else
While not fichero.AtEndOfStream
linea=fichero.readline
posicion = InStr(1,linea,":",1)
nombre = mid(linea,1,posicion -1) & ".htm"
TotFile= Server.MapPath ("/manufacturas") & "\operaciones\" & "\pid\" & nombre
set f = fso.OpenTextFile(TotFile, ForReading, True)
Encontrado = 0
ocurrencias = 0
While not f.AtEndOfStream
line=f.readline
If InStr(1,line,Busqueda,1)<>0 Then
Esta = 1
Encontrado=1
ocurrencias = ocurrencias +1
end if
wend
if Encontrado = 1 then
response.write "<p><H5><a target=" & nombre & " href=" & Procedures & nombre & ">" & linea & "</a></H5><H6>Numero ocurrencias: " & ocurrencias & "</H6>"
end if
f.close
set f = nothing
wend