Welcome Guest, Not a member yet? Register   Sign In
ajax pagination + protoype?
#3

[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'>
<div id='thumb'><img src='http://beta.importzona.com/IMAGE_HREF'></div>;
</div>
&lt;a href="#" onclick="get('PAGE_NUMBER - 1')"&gt; << Previous </a>
CURRENT_PAGE of ROW_COUNT
&lt;a href="#" onclick="get('PAGE_NUMBER + 1')"&gt; Next >></a>

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. Wink


Messages In This Thread
ajax pagination + protoype? - by El Forum - 02-10-2008, 02:43 PM
ajax pagination + protoype? - by El Forum - 02-11-2008, 10:11 AM
ajax pagination + protoype? - by El Forum - 02-11-2008, 03:49 PM
ajax pagination + protoype? - by El Forum - 02-11-2008, 08:25 PM
ajax pagination + protoype? - by El Forum - 02-11-2008, 08:27 PM
ajax pagination + protoype? - by El Forum - 02-11-2008, 09:42 PM
ajax pagination + protoype? - by El Forum - 02-11-2008, 09:50 PM
ajax pagination + protoype? - by El Forum - 06-17-2008, 02:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB