Kane250 Posted March 12, 2009 Share Posted March 12, 2009 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? Quote Link to comment Share on other sites More sharing options...
Kane250 Posted March 23, 2009 Author Share Posted March 23, 2009 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? Quote Link to comment Share on other sites More sharing options...
Floydian Posted March 23, 2009 Share Posted March 23, 2009 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. Quote Link to comment Share on other sites More sharing options...
Kane250 Posted March 23, 2009 Author Share Posted March 23, 2009 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? Quote Link to comment Share on other sites More sharing options...
Floydian Posted March 23, 2009 Share Posted March 23, 2009 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". Quote Link to comment Share on other sites More sharing options...
Kane250 Posted March 24, 2009 Author Share Posted March 24, 2009 Ok, I'll see if I can find out how to split that using javascript then. Any suggestions of what syntax I might use? I really don't know javascript.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.