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>


Reply via email to