Foros del Web » Programando para Internet » ASP Clásico »

Paginacion de 10 en 10

Estas en el tema de Paginacion de 10 en 10 en el foro de ASP Clásico en Foros del Web. Hola chicos: Tengo un problema y es que la web pagina bién todos los registros, en total unas 130 paginas, el problema está cuando busco ...
  #1 (permalink)  
Antiguo 14/04/2004, 02:23
 
Fecha de Ingreso: abril-2004
Mensajes: 21
Antigüedad: 20 años, 2 meses
Puntos: 0
Paginacion de 10 en 10

Hola chicos:

Tengo un problema y es que la web pagina bién todos los registros, en total unas 130 paginas, el problema está cuando busco algo, y me dice que hay por ejemplo 3 páginas, pues bién, veo la primera perfectamente, pero cuando paso a la 2ª me muestra la 2ª del total y no de las 3 de la busqueda que habia hecho.

aquí os pongo mi codigo y si podeis echarme una mano os lo agradeceria y sino también por haber leido el correo.

<!-- #include virtual="/bbdd/mysql_conf.asp"-->
<%
DIM SQL, entrada
response.buffer=1
pagina_error = "errores.asp"
Set conn = Conectado ()
set rs = Server.CreateObject("ADODB.recordset")%>
<html>
<head>
<title></title>
<link rel="stylesheet" href="../estilos.css">
<script src="../ultima_hora.js"></script>
</head>


t=request("t1")
sql="select * from noticia where seccion=179 and titulo_entradilla like '%"+t+"%' or seccion=180 and titulo_entradilla like '%"+t+"%' "
sql=sql &"or seccion=181 and titulo_entradilla like '%"+t+"%'or seccion=182 and titulo_entradilla like '%"+t+"%'or seccion=183 and titulo_entradilla like '%"+t+"%'"
sql=sql &"or seccion=184 and titulo_entradilla like '%"+t+"%'or seccion=185 and titulo_entradilla like '%"+t+"%'or seccion=186 and titulo_entradilla like '%"+t+"%'"
sql=sql &"or seccion=187 and titulo_entradilla like '%"+t+"%'or seccion=188 and titulo_entradilla like '%"+t+"%'or seccion=189 and titulo_entradilla like '%"+t+"%'"
sql=sql &"or seccion=190 and titulo_entradilla like '%"+t+"%'or seccion=192 and titulo_entradilla like '%"+t+"%'or seccion=193 and titulo_entradilla like '%"+t+"%'"
sql=sql &"or seccion=194 and titulo_entradilla like '%"+t+"%'or seccion=195 and titulo_entradilla like '%"+t+"%'or seccion=200 and titulo_entradilla like '%"+t+"%'"
sql=sql &"or seccion=202 and titulo_entradilla like '%"+t+"%'or seccion=206 and titulo_entradilla like '%"+t+"%'or seccion=207 and titulo_entradilla like '%"+t+"%'"
sql=sql &"or seccion=209 and titulo_entradilla like '%"+t+"%'or seccion=229 and titulo_entradilla like '%"+t+"%' order by posi"
'sql = "select * from noticia where seccion=179 order by posi"
rs.open sql, conn, 3
rs.pagesize = 10
intpagecount = rs.pagecount
select case request("action")
case "<<"
intpage = 1
case "<"
intpage = request("intpage")-1
if intpage < 1 then intpage = 1
case ">"
intpage = request("intpage")+1
if intpage > intpagecount then intpage = intpagecount
Case ">>"
intpage = intpagecount
case else
intpage = 1
end select
%>
<form name="MovePage" action="buscador1.asp" method="post">
<input type="hidden" name="intpage" value="<%=intpage%>">
<input type="submit" name="action" value="&lt;&lt;">
<input type="submit" name="action" value="&lt;">
<input type="submit" name="action" value="&gt;">
<input type="submit" name="action" value="&gt;&gt;">
<input type="hidden" name="secc" value="<%response.write(request("secc"))%>">
Página: <%=intpage & " de " & intpagecount%>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
if not rs.eof then
rs.absolutepage = intpage
for intrecord = 1 to rs.pagesize
if rs.eof then exit for
%>
<table width="480" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" width="135">
<table width="100%" border="0" cellspacing="1" align="left" cellpadding="1">
<tr align="center">
<td width="120" height="120">
<%
if rs("foto1")<>"sin foto" then %>
<% if instr(1,rs("foto1"),"/ftp/") then %>
<img src="<%=rs ("foto1")%>" width="120" hspace="5" vspace="5" border=1>
<% else %> <img src="/la_manana/fotos/<%=rs ("foto1")%>" width="120" hspace="5" vspace="5" border=1>
<% end if %>
<% end if
%> </td>
</tr>
<tr> <% if rs("pie")<>"-" then %>
<td class="historico"><%=rs("pie")%></td>
<% end if %> </tr>
<tr align="center"> <% if rs("audio")<>"-" then %>
<td class="historico"><a href="audio/<%=rs("audio")%>"><img src="/imgindex/bescucha.gif" alt="Escucha la noticia" width="118" height="13" border="0"></a></td>
<% end if %> </tr>
<tr align="center"> <% if rs("leer_mas")=1 then %>
<td class="historico"><a href="qmp_pediatria2.asp?noticia=<%=rs("no")%>"><i mg src="/imgindex/b_ampliarinfo.gif" alt="Amplia la información de la noticia" width="118" height="13" border="0"></a></td>
<% end if %> </tr>
<tr align="center">
<td class="historico"><img src="/imgindex/5px.gif" width="1" height="5"></td>
</tr>
</table>
</td>
<td align="center" valign="top" width="485">
<table width="99%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td class="titulonot"><%=rs("titulo_entradilla")%></td>
</tr>
<tr>
<td class="historico" height="86"> <%
entradilla = rs ("entradilla")
entradilla = replace (entradilla,chr(13), "<br>")
entradilla = replace (entradilla,chr(61), "&quot;")
response.write(entradilla)
%> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"><img src="/imgindex/5px.gif" width="1" height="5"></td>
</tr>
</table>
<%
rs.movenext
next
end if
%> <br>
<table width="480" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90%" class="entradilla" align="right" valign="top">
<table width="99%" border="0" cellspacing="0" bgcolor="#F0F0F0">
<tr>
<td class="historico" valign="top" align="right">
<form name="MovePage" action="buscador1.asp" method="post">
<input type="hidden" name="intpage" value="<%=intpage%>">
<input type="submit" name="action" value="&lt;&lt;">
<input type="submit" name="action" value="&lt;">
<input type="submit" name="action" value="&gt;">
<input type="submit" name="action" value="&gt;&gt;">
<input type="hidden" name="secc" value="<%response.write(request("secc"))%>">
Página: <%=intpage & " de " & intpagecount%>
</form>

(He quitado lo des las tablas y tal, porque no entraba)
  #2 (permalink)  
Antiguo 11/05/2004, 11:19
Avatar de Avelar  
Fecha de Ingreso: noviembre-2002
Ubicación: Ensenada, Baja California, México
Mensajes: 673
Antigüedad: 21 años, 7 meses
Puntos: 1
Prueba guardando el filtro en una Cookie o en una variable de sesión y lo aplicas al cargar cada página de resultados.
__________________
Ariel Avelar
  #3 (permalink)  
Antiguo 12/05/2004, 02:09
 
Fecha de Ingreso: enero-2002
Mensajes: 1.438
Antigüedad: 22 años, 5 meses
Puntos: 0
yo utilizo un comportamiento del DW de macromedia q va muy bien pa esto.


Última edición por rrufo; 12/05/2004 a las 02:10
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:22.