Solved

paging and navigation Recordset

Posted on 2004-04-05
10
617 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 20

Expert Comment

by:trailblazzyr55
Comment Utility
Are you still having any trouble with your question???

0
 

Author Comment

by:nikou
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
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 …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

7 Experts available now in Live!

Get 1:1 Help Now