
|
|
|
PageNav
| |
|
Description:
Function to easily navigate through pages.
Navigate through pages with a nice interface, input values would normally be pulled from database recordset information.
|
| |
| Simpleforum: PageNav Open Forum (Total 4 Messages) |
|
| | » Post New Message | View Mode : |
![]()  | | Hello,
Your code look very great but the thing is i don't understand it very well :p. Maybe if you have a litle bit time, can you help me out please.
Thats my code where i need the pagenav. Maybe you can say where i put the code to use the PageNav function.
<% OPTION EXPLICIT dim id,txtNaam,txtVoornaam,txtStraat,txtHuisnummer,txtPostnummer,txtGemeente,txtTelefoon,txtGsm,sqlstring,txtIdFilter %>
<!--#include file="include/mysql.inc"-->
<% dim rsgemeenteoverzicht set rsgemeenteoverzicht = server.createobject("adodb.recordset") rsgemeenteoverzicht.activeconnection=dbMySql rsgemeenteoverzicht.cursortype=3 rsgemeenteoverzicht.cursorlocation=3
Function displayData() txtNaam = rsgemeenteoverzicht("naam") txtVoornaam = rsgemeenteoverzicht("voornaam") txtStraat = rsgemeenteoverzicht("Straat") txtHuisnummer = rsgemeenteoverzicht("huisnummer") txtPostnummer = rsgemeenteoverzicht("Postnummer") txtGemeente = rsgemeenteoverzicht("Gemeente") txtTelefoon = rsgemeenteoverzicht("Telefoonnr") txtGsm = rsgemeenteoverzicht("GSM")
response.write("<tr>") response.write("<td align='center'>") response.write(txtNaam) response.write("</td>") response.write("<td align='center'>") response.write(txtVoornaam) response.write("</td>") response.write("<td align='center'>") response.write(txtStraat) response.write("</td>") response.write("<td align='center'>") response.write(txtHuisnummer) response.write("</td>") response.write("<td align='center'>") response.write(txtPostnummer) response.write("</td>") response.write("<td align='center'>") response.write(txtGemeente) response.write("</td>") response.write("<td align='center'>") response.write(txtTelefoon) response.write("</td>") response.write("<td align='center'>") response.write(txtGsm) response.write("</td>")
response.write("</tr>") end Function %>
<html> <head> <title>Afbeelden van de adresgegevens</title>
<link href="Styles/Test.css" rel="stylesheet" type="text/css">
</head> <body> <table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="5"><div align="right"></div> <p align="center" class="titel">Adresgegevens van de verschillende werknemers</p> <hr align="center"> </td> </tr> <tr> <td> <form action="_self" name="theform"> <input type="button" value="Filteren " onclick="window.open('Popup_adresgegevens.asp', 'Filteren', 'width=600,height=450,status=no,scrollbars=no,toolbar=no,location=yes'); return false" /> </form> </td> </tr> </table> <p> <br> <br> <table width= "100%" border ="0" align="center" cellpadding="0" cellspacing="1"> <tr valign="middle" class="subtitel"> <td height="25" bgcolor="#130678" align="center" TEXT="white"><span >Naam</span></td> <td height="25" bgcolor="#130678" align="center" TEXT="white"><span >Voornaam</span></td> <td height="25" bgcolor="#130678" align="center" TEXT="white"><span >Adres</span></td> <td height="25" bgcolor="#130678" align="center" TEXT="white"><span >StraatNummer</span></td> <td height="25" bgcolor="#130678" align="center" TEXT="white"><span >Postcode</span></td> <td height="25" bgcolor="#130678" align="center" TEXT="white"><span >Gemeente</span></td> <td height="25" bgcolor="#130678" align="center" TEXT="white"><span >Telefoonnummer</span></td> <td height="25" bgcolor="#130678" align="center" TEXT="white"><span >GSM</span></td> </tr>
<% if request.QueryString("idFilter") = empty then txtIdFilter = 0 else txtIdFilter = request.QueryString("idFilter") end if
if txtIdFilter = "0" then rsgemeenteoverzicht.open "select naam,voornaam,Straat,huisnummer,Postnummer,Gemeente, Telefoonnr, GSM from gebruikers" while NOT rsgemeenteoverzicht.eof displayData() rsgemeenteoverzicht.movenext wend else rsgemeenteoverzicht.open "select naam,voornaam,Straat,huisnummer,Postnummer,Gemeente, Telefoonnr, GSM from gebruikers where id =" & txtIdFilter displayData() end if
rsgemeenteoverzicht.close %>
</table> <br> <p> <div align="center"><a href="javascript:window.close()">Venster sluiten</a></div> <br> <p> <div align="center"><a href="Inhoud.asp">Home</a></div> </body> </html>
|
|  | | Hi! its a great piece of code! My problem is with the following code:
onchange=""document.location = '?curpage=' + document.frmPage.curpage.value;""
the location url contains some variables "url?variable1=value&variable2=value" before "curpage" so when the code is executed it replaces the variables with "url?curpage=value", which actually changes the actual location of the current page.
Please help!!
|
|  | | Sorry my bad english firstly; Your codes is so great. Thanks for your jobs.
My problem;
My codes,
.... ... -database connection string -recordset connection ..... .... -Do while not dataset.eof -database records showing -Loop
Where can i place the pagenav codes? I can try the different types, but the codes listed the same records in multiple pages.
Help me please
|
|  | | here is one example on how to use the pagenav function: <!-- #include virtual="include/_pagenav.asp" --> '--- define variables Dim intPageSize, intRecordCount, intRecords, intLastPage, intCurrentPage intPageSize = 5 '--- define the page size you want -database connection string -recordset connection rs.open SQL, Connection, adOpenStatic, adLockReadOnly, adCmdText intRecordCount = rs.RecordCount '--- fetch the total number of records in the database
If Not rs.EOF Then If len(Request.Querystring("page")) > 0 then intCurrentPage = CLng(Request.Querystring("page")) Else intCurrentPage = 1 End if For intRecords = 1 to intRecordCount If intRecords = ((intCurrentPage * intPageSize) - intPageSize) Then database records showing End if rs.Movenext Next Else response.write "No record found" End if rs.Close Set rs = Nothing intLastPage = int(intRecordCount/intPageSize) + 1 '--- calculates the last page number if intLastPage = 0 then intLastPage = 1 '--- set always last page > 0 to avoid errors Call PageNav(intCurrentPage, intLastPage) '--- cal the pagenav function and show navigation commands
|
|
|
|
|
|
| CATEGORIES: |
 |
Applications
(5)
(ASP Applications Collection)
ImageThumbs
|
This application let you show a nice thumbnail images presentation on your web pages, with autoresize.
|
|
WEB Calendar
|
Database driven daily, weekly and montly event web or intranet calendar with event add, edit and delete.
|
|
dbList
|
Database management grid with record edit, delete, add, search, filter and export to excel, database and table dropdown selection, pages navigation, field sort and search in page.
|
|
Active Users
|
Show active users and who is online on your web pages without global.asa.
|
|
|
 |
Code Snippets
(1)
(ASP Code Snippets Collection)
PrinterFriendly
|
This code snippet shows how to implement a "printer friendly" version link for your pages.
|
|
|
 |
Functions
(3)
(ASP Functions Collection)
getFileName
|
Given a file path either physical or virtual with this function you can obtain the file name or the file dir
|
|
okEmail
|
ASP function to check proper email input
|
|
PageNav
|
Function to easily navigate through pages.
|
|
|
| |
| Total Resources: |
| 9 downloads available. |
|
|
|
|
|
| 
|
|