ajax pagination + protoype? |
[eluser]MMCCQQ[/eluser]
trying build a ajax pagination with Prototype for my Gallery! i got this! ,,work it! but i need to know how show Prev,Next and 1,2,3,4...Page Link Controller Code: function Gethumb(){ View Quote:
[eluser]Nick Husher[/eluser]
You will need to collect information on how many photographs you have. There's a way of doing a count of the number of records in the table without actually calling count, and I seem to remember a few threads on that topic on this forum. You'll then need to hand that information either to your view when the page loads, or to your javascript widget as you change the page. At the moment, you're sending just the code for the image, but you could also pass along the pagination information as well: Code: <div id='thumb_wrap'> You need to replace the capitalized keywords with your calculated values, of course. Also, you might want to think about switching to some more-unobtrusive javascript. Onclicks are so 1999.
[eluser]MMCCQQ[/eluser]
i did it , well... but dont work in Explorer 7 Code: function Gethumb(){
[eluser]MMCCQQ[/eluser]
[quote author="Nick Husher" date="1202788188"]You will need to collect information on how many photographs you have. There's a way of doing a count of the number of records in the table without actually calling count, and I seem to remember a few threads on that topic on this forum. You'll then need to hand that information either to your view when the page loads, or to your javascript widget as you change the page. At the moment, you're sending just the code for the image, but you could also pass along the pagination information as well: Code: <div id='thumb_wrap'> You need to replace the capitalized keywords with your calculated values, of course. Also, you might want to think about switching to some more-unobtrusive javascript. Onclicks are so 1999. [/quote] can you tell me how can i get Pagination Links?
[eluser]Pascal Kriete[/eluser]
Why don't you try to first do pagination using the native CI library. Then once you get that working, you can hijack it with javascript. It's very difficult to debug php and javascript together. Starting with pure php also has the advantage of encouraging unobtrusive javascript. You will not have to change a single thing in your html body (assuming everything has an id) once you start to write your javascript. Let us now how it goes .
[eluser]tunelko[/eluser]
maybe the method create_lnks() ? You must start reading |
Welcome Guest, Not a member yet? Register Sign In |