View Full Version : Problem with Ajax Pagination Script

05-17-2008, 07:16 PM
1) Script Title: Ajax Pagination Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxpaginate/index.htm

3) Describe problem: Forget my last topic, I have narrowed the problem down to the Ajax Pagination Script. When I visit the page individually in Opera it works but not in Firefox or Internet Explorer and I don't understand why.

I visit the example page in those two browsers and it works fine. I have copied and pasted the exact code in both the .html and .js file from the working example site onto my own site but it still will not work! The ONLY clue I have is from Firefox's error console, which states "ajaxpageclass is not defined". I have copied and pasted the code exactly from your working example yet you don't have this error in the error console. What am I doing wrong?

Here is the code for the .html file:

<link rel="stylesheet" type="text/css" href="ajaxpagination.css" />

<script src="ajaxpagination.js" type="text/javascript">
* Ajax Pagination script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
<div id="paginate-top"> </div>

<div id="pcontent"> </div>

<div id="paginate-bottom"> </div>

<script type="text/javascript">

var myajaxbook={} //arbitrary variable to hold page settings for this book
myajaxbook.page=["welcome.htm", "welcomenewtrainertwo.php", "welcomenewtrainerthree.php"]
myajaxbook.selectedpage=0 //set page shown by default (0=1st page)

var mypages=new ajaxpageclass.bindpages(myajaxbook, "pcontent", ["paginate-top", "paginate-bottom"])


What am I doing wrong? The .js file is the exact same as the one made for download.

05-19-2008, 12:39 AM
Based on the code you posted above it's impossible to tell. Do you have a URL to the problem page?

05-20-2008, 12:18 PM
The URL is http://www.thepikaclub.co.uk/dev/intsample.htm

It'll work in Opera but not Firefox/Internet Explorer

05-21-2008, 09:52 AM

05-28-2008, 10:59 AM
May I have some help with this please? I'd really like to solve the issue.

05-28-2008, 09:50 PM
Sorry for the delay. Had a look initially but couldn't find the culprit. Looking at your page again now, I no longer see the pagination script. Anyhow, it seems what you were trying to do was embed the script within the page shown inside the interstitial content script, which 1) could be the culprit, 2) makes it a lot harder to debug due to the two's interaction. Try getting the script to work on its own first (ie: http://www.thepikaclub.co.uk/dev/welcomenewtrainertwo.php), before doing anything else.