Loading... Please wait.
 Livio.net Home Page
  Users online:   90  
Home Web Design Sitemap Contact
 Go to Home Page  Printer Friendly version of this page  Bookmark this page
     
Web  Livio.net
  
Friday, September 10, 2010   »» 
ASP Scripts
ASP Functions Library
Weather Forecast
Paragliding fly sites
Live Web Cams
Image Gallery
Online Road Maps
Online Translations
Currency Conversion
IP Geolocation Tool
Online Feed Reader
Freeware Software
Friend sites
ASP Links Reference

 Cool Links

 Cool Links

 Cool Links

 Cool Links

 Cool Links



Join the Mailing List
Mailing List: privacy policy


   Asp Scripts
   PageNav     

Author: Livio Siri
Size: 9 kb
Downloads: 4442
Revision: 2.0
Date: 08/06/2005
Category: Functions
   View Demo    DEMO

 View Info    INFO

 View License Agreement    LICENSE

 Download   DOWNLOAD
 

Back to the category: Functions
Back to scripts home page
Description:
Function to easily navigate through pages.

Navigate through pages with a nice interface, input values would normally be pulled from database recordset information.
 

Rated:
by Aspin.com users
What do you think?
 
Rate this script
@ HotScripts.com
Simpleforum: PageNav Open Forum (Total 4 Messages)
» Post New MessageView Mode : Full   Preview  Titles Refresh
Page 1 of 1  First | Previous | Next | Last
Message
Problem with the pagenav scriptdimitri'06 May 4, 15:28
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>
Message
"pagenav" Problem with the page dropboxSanwa'06 Mar 31, 10:38
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!!
Message
Pagenav function include problemOkan Arslangiray'05 Dec 12, 10:34
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


Message
RE: Pagenav function include problemLivio'05 Dec 23, 19:21
here is one example on how to use the pagenav function:


&lt;!-- #include virtual="include/_pagenav.asp" --&gt;
'--- 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


Visit Livio.net for more OpenSource ProjectsPowered by SimpleForum V2.0

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
 Planet Source Code Superior Coding Contest Winner 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.

  Security Login
Protect your ASP pages with password access.



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.

 

Top 10 Downloads:
  WEB Calendar  (29145)
  ImageThumbs  (19991)
  dbList  (19646)
  PrinterFriendly  (4632)
  PageNav  (4442)
  Security Login  (3168)
  Active Users  (2908)
  okEmail  (1083)
  getFileName  (864)

Total downloads: 85879

Total Resources:
9 downloads available.

Script Search:


Make a donation:
If you find the code useful, then please help supporting the development and update of these and future scripts by a small donation:



Powered by:
 Livio.net




 

Page rendered in: 297 ms  
Copyright © Livio.net MM-MMX. All rights reserved.

 Get Firefox!
   This Page Is Valid HTML 4.01 Transitional!
   This page is CSS validated
   livio.net page rank
   Help beat spam!
  HAM Radio  I K 1 H S L
    Site Stats
 
Privacy License Terms of Use Report Errors Link to Livio.net
nfl jerseys nfl jerseys mlb jerseys nhl jerseys cheap nfl jerseys cheap jerseys wholesale jerseys