PDA

View Full Version : Virtual Pagination and Ajax



davidz
08-22-2007, 08:38 PM
1) Script Title: Virtual Pagination

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

3) Describe problem:

I have the Virtual Pagination stuff working just fine. But now I've added some more complexity to the site. Mainly using Ajax/PHP/Mysql. What I need to do is have a link on the page run an onClick event and run some Javascript/Ajax that gets the virtual pagination stuff and then dumps it into the page. The Ajax stuff works but when it gets the virtual pagination instead of showing one picture at a time and changing when you click next it just shows all the pictures at once.

So I guess my question is whether this is even possible with this script? The idea of dropping the virtual pagination stuff in after the page loads with javascript/ajax.

Thanks!
David

PS If this is not possible, I would love some input on an alternative ;-)

ddadmin
08-23-2007, 08:05 AM
Hmm it certainly should be possible, using Ajax to fetch all contents of the Virtual Pagination script that is. I recently modified a similar script, Featured Content Slider, so all of its contents come from a single external file: http://www.dynamicdrive.com/forums/showthread.php?t=22959

If you need additional help, I'll have to revisit this thread when I have more time to see if I can do the same for this script.

davidz
08-23-2007, 01:27 PM
I read through the link you provided. The problem I see with that is that I can not load all the virtual paginations into an external page then rotate through them. I've attached two screen shots so you can see what I'm doing. (I blurred them for privacy).

In search.jpg you see that the user can search the database for data that gets displayed (this can be anywhere from 5 results to 5000 results). Then they click the view button that goes back out to the server with javascript/ajax and fills in the detail section. See details.jpg. I want to put three pagination scripts in the three image boxes. (I've already got the multiple pagination on the same page working).

So I can't really build an external page based on the search results, because it could be huge.

I look forward to any help you can provide!!

Thanks!!
David

PS. I added a third attachment (details2.jpg) showing what the script does right now.

ddadmin
08-24-2007, 03:38 AM
Thanks for the screenshots, but they're making things more confusing, for me at least. :) Do you have a URL to the problem?