Hello, I pull the info from the database with a query, then I have a table to show the information. I found several PHP tutorials on how to make some page numbers : << PREV 1 - 2 - 3 -4 NEXT >> (in case you don't know what I mean) and I can do that. It dosn't seem so hard. However I was thinking on doing it the AJAX way. I tried to do a google search, however I don't know for what to search exactly. -------- Normaly from what I'm thinking, when the page is loaded and I query the info, I will build the pages normaly. But the link from the pages must be done JavaScript style. I'm trying to understand the normal process on how to do this, but ... 1. Think that I have to make a function that sends the requied page to the PHP, then the PHP has to send back the new info and display it, updating the link (from the address bar) and also changing the page links (if i'm on the page 2, and I go to page 3, page 3 should not be marked as a link)... So any sugestions? Thanks
I don't think that you can achieve this. As far as I know, you can't change or refresh the main page with AJAX.
I'v seen this going on. You click on the new page. A "small window" appears telling about the "loading...", the link from the address bar chagnes and the new table is populated. The link to the new page is: javascript://browse.php?orderby=added&page=3 I'm trying to figure what function it's calling.
You can do it easily... Its quite easy actually. I recommend you to use mootools for the javascript part... have a look at this: http://demos.mootools.net/Request.HTML# Basically, you query your server, by sending GET parameters. For example: http://www.yourdomain.com/index.php?begin=5&amount=10 . Then, in your php script, you make the SQL query necessary to get your data, show it in html, and the Request.HTML object, in javascript will take that html content and add it inside any container of your DOM.(For example, a div element). It takes around 20 minutes to write that... if you cant write it, PM me and I willwrite it for you. Steve
Hey - just use this table.js javascript : http://www.javascripttoolbox.com/lib/table/ Killer little script - I use it everywhere. Sorts filters, paginates all client side which is nice.
I have several tables that I load 500+ records into them - load time is fine - sort time is great. Its one of the best ones out there that I have seen. Some one tried to do something like it in MooTools - but the speed just wasnt / isnt there.
Now I have about 200 enytries and it tages about 5 seconds to load on my localhost, that's why i'm curious on how this script manages to hide and then filter/sort the products.
I'm looking and looking at that javascript table and I can't figure it out. Basicly there is no documentation on how to start with it. Later Edit: Hmm... I manage to show the table. Only 25 rows (but I can change that). Then I also have the links that change the "page" of the table. However it still takes a long time to load, because I have about 150 total rows and I will have more. So I will still have to limit the query to 25 rows. Then when a new page is pushed, I will try to modify the "page javascript function" to get the new query and display it in the table. Soooo... I manage to play with the table. Great stuff there, however I also have to limit my query so the page will load faster
Hi PET, You may have a look at this cool example, exactly what you need: http://www.koolphp.net/support/demos/#koolajax.example_paging