New on

DHTML Chess Wordpress Plugin (Beta) . Participate in the beta testing of the DHTML Chess for WordPress plugin, and receive a free Commercial License worth USD99.

Ajax dynamic scrolling pages


Bookmark and Share


This script is distributed under the LGPL open source license.
Commercial licenses are also available. Some of these licenses also includes personal e-mail support for up to 1 year.

Download script

You can download the entire script from this zip file.


Files in package

  • ajax-dynamic-pages.html = Main HTML file.
  • js/ajax.js - Ajax (Sack Library)
  • js/ajax-dynamic-content - The dynamic content script from this site
  • js/ajax-dynamic-pages - The main JS file for this script

How to configure the script

Step 1: Create HTML tag where the dynamic pages will be inserted

Just create an empty HTML element somewhere on your page. Example:

<div id="pageContainer">


Step 2: Create and configure class object

The next thing you have to do is to create an object of the class DHTMLgoodies_scrollingPages and configure this object. This could should be placed below the HTML tag you created in step 1. Here's an example of such js code:

<script type="text/javascript">
var dynPageObj = new DHTMLgoodies_scrollingPages();

First we create the object. Then we specify that the element with id="pageContainer"(ref. step 1) should be the target for our dynamic pages. Next, we specify which url to insert into this page.

We can also specify scroll speed. A lower value means faster scrolling.

Finally, we call the loadPage method which will load the first page and display it inside <DIV id="pageContainer">.

Step 3: Load additional pages

This is done by inserting links(<A> tags) inside our dynamic pages(i.e. getPage.php here). This is how this link could look like:

<a href="#" onclick="dynPageObj.setUrl('getPage.php?pageNo=2');dynPageObj.loadPage();'none';return false">Next page</a>

You can find more help on the js methods here


thanks for your code, but there is problem why this ajax is called only once? first time I call the function it works fine but the next time it does not work
hadideveloper at 09:00AM, 2011/10/08.
can we show single page on time means only 10 records at a time on click on next button
geeta at 12:25PM, 2012/01/20.
vnbnvb at 05:04PM, 2012/02/08.
s at 09:23AM, 2015/03/09.

Post your comment

Don't have an avatar? Create one at

Confirmation code:

Go to

About/Contact | A good idea? | Submit a script | Privacy notice
© 2005 - 2017