Thanks for the reply, Josh... I think the part that I'm not understanding is the "dump the whole query to the client and then the plugin takes care of the pagination."
It also sounds like a memory and/or processor intensive way to get 20 records per page. If I have 10,000 records, I guess I would be getting and dumping all 10,000 records at once? I've considered taking the straight CF route with this, or perhaps using SQL to retrieve just the records I need. Would using CF or SQL be preferable for datasets composed of thousands of records? Rick On Apr 10, 3:31 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote: > Rick - I don't know how the pagination plugin that you're using works, but > there may be some sort of "before" event that you can use to ajax some > variables to your CF page. Your CF template would take these variables and > use them to set the startrow and maxrow values and then send back the > result. > > That said, not sure why you'd need to do that if you're doing pagination on > the client side? The idea is that you dump the whole query to the client > and then the plugin takes care of the pagination. > > -- Josh > > > > ----- Original Message ----- > From: "Rick Faircloth" <[EMAIL PROTECTED]> > To: <jquery-en@googlegroups.com> > Sent: Thursday, April 10, 2008 12:19 PM > Subject: [jQuery] How do I use ColdFusion and jQuery variables for > > pagination? > > > Hi, all... > > > I'm a bit confused about how to get variables from jQuery that > > I can use in my ColdFusion code. > > > In typical CF pagination, I use startrow and maxrows variables > > to limit the query output. How would I get these variables > > from the jQuery? > > > I just can't piece together what's happening. > > > Below is the jQuery I'm currently using. The total number > > of records is set in the jQuery using the recordCount CF variable. > > > Thanks for any help! > > > Rick > > > <script type="text/javascript"> > > > function pageselectCallback(page_id, jq){ > > $('#Searchresult').text("Showing search results > > "+((page_id*20)+1)+"-"+((page_id*20)+20)); > > } > > > $(document).ready(function(){ > > // Create pagination element > > > $("#Pagination").pagination(<cfoutput>#get_properties.recordCount#</cfoutput>, > > { > > items_per_page:20, > > num_edge_entries: 2, > > num_display_entries: 20, > > callback: pageselectCallback > > }); > > }); > > > </script>- Hide quoted text - > > - Show quoted text -