• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 649
  • Last Modified:

paging and navigation Recordset

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
nikou
Asked:
nikou
1 Solution
 
Jim MCommented:
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
 
trailblazzyr55Commented:
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
 
alexhoganCommented:
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
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
trailblazzyr55Commented:
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
 
trailblazzyr55Commented:
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
 
trailblazzyr55Commented:
Are you still having any trouble with your question???

0
 
nikouAuthor Commented:
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
 
trailblazzyr55Commented:
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
 
trailblazzyr55Commented:
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
 
trailblazzyr55Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now