Solved

paging and navigation Recordset

Posted on 2004-04-05
10
633 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 2

Expert Comment

by:Jim M
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

623 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