Solved

paging and navigation Recordset

Posted on 2004-04-05
10
620 Views
Last Modified: 2007-12-19
Any body knows any free script for macromedia Dreamweaver MX that could navigate the recordset in ASP looks lik this:
<< Previous 1 2 3 4 next >>
0
Comment
Question by:nikou
10 Comments
 
LVL 2

Expert Comment

by:g8tor23
ID: 10761923
This is the best one I've found, but it isn't free:

http://www.basic-ultradev.com/exthelp/DataNavigation/

$35.00 is a small price to pay for so many features, though.

Also, if you really want some help with this, you should consider offereing more than 20 points...just a thought.

Good luck!

-g8tor
0
 
LVL 20

Expert Comment

by:trailblazzyr55
ID: 10783346
If you were using coldfusion I have a cf tag I made to take care of all the recordset navigation stuff, if you have any experience with coldfusion I could give you the idea behind it and you could create a tag for yourself in ASP that does this for you? But I'm not that familiar with ASP so I wouldn't be able to offer any examples using ASP.

Lemme know,

rgds,
~trail
0
 
LVL 8

Expert Comment

by:alexhogan
ID: 10784725
Here is a code example that shows how to do pagination in asp.

http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_20110871.html?query=pagination&searchType=topic

;-)
0
 
LVL 20

Accepted Solution

by:
trailblazzyr55 earned 20 total points
ID: 10896594
Hey nikou,

Here's what you're looking for if you are using coldfusion, here's two links to a solution for ya and an example below from another site
Hope it helps, lemme know if you still need help...

http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_20873966.html
http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_20621015.html

example below-------------------->


<HTML>
<HEAD>
     <TITLE>ColdFusion Previous / Next</TITLE>
</HEAD>

<BODY BGCOLOR = "#ffffff">

<CFQUERY DATASOURCE = "gallery" NAME = "list">
SELECT State
FROM States
<CFIF IsDefined("Keyword") AND Len(Trim(Keyword))>
     WHERE State LIKE '%#Keyword#%'
</CFIF>
ORDER BY State
</CFQUERY>

<!--- Set the number of records to display on each page. --->
<CFSET OnEachPage = 8>

<!--- Set the default startrow to 1 if a value was not passed. --->
<!--- Determine whether or not to show the previous or next links. --->
<CFPARAM NAME = "StartRow" DEFAULT = "1">
<!--- Set the value of endrow to the maxrows + startrow - 1 --->
<CFSET EndRow = StartRow + OnEachPage - 1>
<!--- If the end row is greater than the recordcount, determine how many records are left. --->
<CFIF EndRow GTE list.RecordCount>
     <CFSET EndRow = list.RecordCount>
     <CFSET Next = false>
<!--- Othereise, set Next to true and determine the next set of records. --->
<CFELSE>
     <CFSET Next = true>
     <CFIF EndRow + OnEachPage GT list.RecordCount>
          <CFSET NextNum = list.RecordCount - EndRow>
     <CFELSE>
          <CFSET NextNum =  OnEachPage>
     </CFIF>
     <CFSET NextStart = EndRow + 1>
</CFIF>
<!--- If StartRow is 1, set Previous to false. --->
<CFIF StartRow IS 1>
     <CFSET Previous = false>
<!--- Othewise, determine the previous set of records. --->
<CFELSE>
     <CFSET Previous = true>
     <CFSET PreviousStart = StartRow - OnEachPage>
</CFIF>

<!--- Determine how many pages will be displayed. --->
<CFSET NumPages = Ceiling(list.RecordCount / OnEachPage)>
<CFPARAM NAME = "PageNum" DEFAULT = "1">

When large recordsets are returned, it is nice to break them up on multiple pages,
providing the user with links or buttons to go forward and backword.<P>

Here is an example of how to do that.  The total number of records returned is 50
and I'm displaying 8 at a time.  I chose 8 because the last page will contain only
2 records.<P>

In order to reduce the amount of records returned, you can search for a specific
state(s):<P>

<FORM ACTION = "CFPreviousNext.cfm" METHOD = "post">
     <INPUT TYPE = "text" NAME = "Keyword" VALUE = "" SIZE = "15"> <INPUT TYPE = "submit" VALUE = "Search">
</FORM><P>

<CFOUTPUT>
Now displaying records #StartRow# to #EndRow# of #list.RecordCount#.<P>
</CFOUTPUT>

<TABLE BORDER = "0">
     <TR>
          <TD VALIGN = "top">
               <!--- If Previous is true, display the previous link. --->
               <CFIF Previous>
                    <CFOUTPUT>
                         <A HREF = "CFPreviousNext.cfm?StartRow=#PreviousStart#&PageNum=#DecrementValue(PageNum)#<CFIF IsDefined("Keyword")>&Keyword=#URLEncodedFormat(Keyword)#</CFIF>"><< Previous</A>
                    </CFOUTPUT>
               <CFELSE>
                     
               </CFIF>
          </TD>
          <CFLOOP FROM = "1" TO = "#NumPages#" INDEX = "ThisPage">
               <CFOUTPUT>
                    <CFIF ThisPage IS PageNum>
                         <TD>#ThisPage#</TD>
                    <CFELSE>
                         <CFSET PageNumStart = (((ThisPage - 1) * OnEachPage) + 1)>
                         <TD><A HREF = "CFPreviousNext.cfm?StartRow=#PageNumStart#&PageNum=#ThisPage#<CFIF IsDefined("Keyword")>&Keyword=#URLEncodedFormat(Keyword)#</CFIF>">#ThisPage#</A></TD>
                    </CFIF>
               </CFOUTPUT>
          </CFLOOP>
          <TD VALIGN = "top">
               <!--- If Next is true, display the previous link. --->
               <CFIF Next>
                    <CFOUTPUT>
                         <A HREF = "CFPreviousNext.cfm?StartRow=#NextStart#&PageNum=#IncrementValue(PageNum)#<CFIF IsDefined("Keyword")>&Keyword=#URLEncodedFormat(Keyword)#</CFIF>">Next >></A>
                    </CFOUTPUT>
               <CFELSE>
                     
               </CFIF>
          </TD>
     </TR>
     <TR>
          <TD VALIGN = "top" COLSPAN = "<CFOUTPUT>#Evaluate(NumPages + 2)#</CFOUTPUT>">
               <CFOUTPUT QUERY = "list" STARTROW = "#startrow#" MAXROWS = "#OnEachPage#">
               #State#<BR>
               </CFOUTPUT>
          </TD>
     </TR>
     <TR>

</BODY>
</HTML>

example above ------------------------------------^


Regards,
~trail
0
 
LVL 20

Expert Comment

by:trailblazzyr55
ID: 10910048
Hey just checking, do you still need help on this question? I see you still have it open, wondering if you have it working now?

Need any more help, lemme know :)

Regards,
~trail
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 20

Expert Comment

by:trailblazzyr55
ID: 11020218
Are you still having any trouble with your question???

0
 

Author Comment

by:nikou
ID: 11029437
Ya, trailblazzyr55,
I am looking for a free ASP Dreamweaver extension to produce automatically paging like this.<< Previous 1 2 3 4 next >>
I've written an script to do that but could not be used to expand in Dreamweaver MX.
0
 
LVL 20

Expert Comment

by:trailblazzyr55
ID: 11034099
Yeah there's an extension you can add in there for dreamweaver, made by Tom Muck, here's the page..

http://www.dmxzone.net/ShowDetail.asp?NewsId=2219

you may also want to check out this page:

http://www.experts-exchange.com/Web/WebDevSoftware/DreamWeaver/Q_20700487.html

Good Luck!
regards,
~trail
0
 
LVL 20

Expert Comment

by:trailblazzyr55
ID: 11034135
oops sorry bout that, hold on a sec...

check out this first:

http://www.experts-exchange.com/Web/WebDevSoftware/DreamWeaver/Q_20700487.html

and I'll get back to ya in a sec on what the paging extension link is
0
 
LVL 20

Expert Comment

by:trailblazzyr55
ID: 11034183
Alright here's the link to Tom Muck's updated recordset navigation suite...

http://www.basic-ultradev.com/exthelp/DataNavigation/


This one: http://www.dmxzone.net/ShowDetail.asp?NewsId=2219 is to anotehr extension of his. Sorry...

Now this recordset navigation suite does cost a little bit, but it's worth it if you want an extension that does all that recordset stuff for you, but there are other free extensions out there, but they're pretty limited.

This page on here
http://www.experts-exchange.com/Web/WebDevSoftware/DreamWeaver/Q_20700487.html

should give you a example on how you could do the recordset paging.

Regard,
~trail
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now