Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

Recordset Paging - Page 15

August 14,2002

So far we have displayed our categories dynamically. When a category is clicked the user is taken to a complete list of all books associated with the respective category. Thus far we only have 20 different records to display in total – this is easy to deal with, but what about in future, when we want to display lots more? Also bear in mind that when we add the thumbnail images, they will increase the page loading time even further, so it will eventually become unmanageable to display all the records for each category every time.

So what if we wanted to remedy this by say, displaying 4 records at a time? This is all no problem at all – that's what the Recordset Paging set of behaviors is for.

Displaying a Few Records At a Time

Let's make some adjustments to our books.asp page by having only 4 records display at a time. Before we go any further we have to edit our repeat region. Double-click the Repeat Region behavior listed in the Server Behaviors list from the Application Panel. This will re-open the dialog box that selects our Repeat Region parameters. Instead of showing all records check the radio button above it and show 4 records at a time. Hit OK.

Move To Previous Record

Place your cursor in a suitable place (we chose a place in the second column of the first row of your table) and select Server Behaviors > + > Recordset Paging > Move To Previous Record, which should bring up the following dialog box:


Leave the value for the Link field the way it is; it will create the text for us. Make sure the rsBooks recordset is selected in the Recordset field and hit OK. The Previous hyperlink will be added to your page where you put your cursor.

Move To Next Record

Choose another suitable space (we chose a space just to the right of the Previous hyperlink) and select Server Behaviors > + > Recordset Paging > Move To Next Record, and click OK. A Next hyperlink will be added to the right of our Previous hyperlink.

Before we view the page in our browser, let's use an Application Object called the Recordset Navigation Status. This object creates a display of how many records exist and how many are being displayed currently. It shows the user where he or she is in the context of all the records collectively. Before we add it, let's make some room for it by adding a third row above the row that contains the Previous and Next links. Do this by placing your cursor in the first row, right-clicking, and selecting Table > Insert Row – an empty row should be created above the other two.

Now that we have created the empty row place your cursor in the second column of the first row. Select Insert > Application Objects > Recordset Navigation Status, and OK the dialog box that appears, to add the object to our page. Now when we view the books.asp page in a browser we should see something like this:


Although the page looks great, there is one slight problem that needs fixing – did you notice it? The problem is that when you get to the detail page, the Previous hyperlink is displayed even though there are no previous records (when records 1-4 are displayed). In addition, when you scroll through the records and get to records 12-16, the last group of records, the Next hyperlink is still displayed.

What we really want to happen is for the Previous link to show only if you are not at the first record, and the Next link to show only if you are not at the last record. Well guess what? Dreamweaver MX has another group of server behaviors that do this for us! They can be found under Server Behaviors > + > Show Region.

Detail Page(Cont.) - Page 14
Dynamic Dreamweaver MX
Show Region - page 16


Up to => Home / Authoring / DynamicDW




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers