Visualizzazione dei risultati da 1 a 2 su 2

Discussione: paginazione...

  1. #1
    Utente di HTML.it
    Registrato dal
    Oct 2003
    Messaggi
    96

    paginazione...

    Ragazzi ho realizzato questo script che mi visualizza a video una serie di immagini estratte da un database. In dettaglio ne dispone quattro per riga. Quello che ho intenzio di fare è paginarle visualizzandone 4 su cinque righe e poi con l'apposito link andare alla pagina succesiva. Mi potreste dare una mano visto che non sono tanto pratico di asp? grazie.

    Lo script da me realizzato è il seguente:
    <td width="82%">
    <%

    jj=0
    Set cn=Server.CreateObject("ADODB.Connection")
    OpenStr = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.Mappath("mdb-database/fotogallery.mdb")
    cn.Open openStr
    ifin=5

    for pp=0 to 5
    %>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <%
    if k = 0 then
    valestr = 4
    else
    valestr = 3
    end if

    for i=0 to valestr

    Set rs1 = CreateObject("ADODB.Recordset")
    sqlS = "select * from info where num = " & jj
    rs1.Open sqlS,cn
    while not rs1.eof

    %>
    <td width="1%"></td>
    <td width="18%"><table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1" style="border: 1px solid #C7D6C7">
    <tr>
    <td bgcolor="#E9EFE9" height="5"></td>
    </tr>
    <tr>
    <td height="150" align="center">
    <%
    response.write "[img] & rs1([/img]"
    'response.write jj
    %>
    </td>
    </tr>
    <tr>
    <td bgcolor="#E9EFE9" height="30">
    <table border="0" width="100%" cellspacing="0" cellpadding="0" id="table2">
    <tr>
    <td width="40" align="right">
    [img]immagini/s.gif[/img]</td>
    <td><font face="Verdana" size="1">zoom</font></td>
    <td width="28">
    [img]immagini/p.gif[/img]</td>
    <td><font face="Verdana" size="1">Invia</font></td>
    </tr>
    </table>
    </td>
    </tr>
    </table></td>
    <td width="1%"></td>

    <%
    rs1.movenext
    wend
    jj=jj+1
    k=k+1
    next
    %>
    </tr>
    <tr><td height="30"></td></tr>
    </table>

    <%
    next
    %>
    </td>

  2. #2
    Ma perchè non leggete il regolamento?

    1. Articolo 13
    2. Guarda in firma a Roby_72 . Nel sito troverai uno script per la paginazione che potrai adattare.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.