Jump to content

Can someone tell me how I could call this?


Kane250

Recommended Posts

  • 2 weeks later...

Really?  Nobody here knows how to use pagination through ajax or jquery?  I'm finding scripts online, but none of hem seem to be easy to link to PHP.  The one from the link I posted earlier works great.  I just need to be able to return that information on another page without refresh into a div.... anybody?

Link to comment
Share on other sites

http://www.phpfreaks.com/tutorial/basic-pagination

 

I just want to have the links from this (<>) example, to appear on a separate page, and return the results from the php into a div on that page through ajax or Jquery.  Could this be easily done?

 

The answer to your question "Could this be easily done?" is two fold.

 

It depends on your experience level.

 

It's hard without any experience. It's easy with it.

Soz, I'm not going to explain how to make it work though, as it'd take a lot of typing, and I'm sure there's ajax pagination tutorials already. In fact, I'm sure jQuery has examples to go along with their pagination. And I know for a fact the library I use, Yahoo YUI, has an ajax pagination example.

Link to comment
Share on other sites

Hi, thanks for your response.  My experience level with ajax is very low, but I have used YUI before.  My real question was, "is there an ability to add ajax to the basic php pagination script".  Since that script is already outputting my data how I want it (1 item per page), all I really wanted was something through ajax that would go through those pages and collect / return the data when I hit a back or forward arrow.  I don't see the point in recreating a new pagination script if something could be implemented into that one.  However, I wasn't sure if that would be possible or not since it's written in PHP.  Does the entire pagination need to be done using ajax?

Link to comment
Share on other sites

It's very possible.

 

Take the part of the script with the query and the formatting/outputting of the query results and put it on a page of it's own.

 

Then use the rest to setup a "frame" for the query results to load into.

 

Simply put: you have to break that deal into two parts. Both parts can be php scripts, providing that your output contains html and javascript to create the "frame".

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.