Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6187395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:03:03+00:00 2026-05-24T02:03:03+00:00

I set up some Ajax Pagination for sorting records. It’s actually working as expected

  • 0

I set up some Ajax Pagination for sorting records. It’s actually working as expected with the exception that:

1. On fresh page load: Click and sort column displays indicator and sorts as expected.

2. Sort again, and its processed as a standard http request. Results are sorted, but not by Ajax.

3. Sort a 3rd time, and the Ajax is back working and sorts as expected.

It’s back and forth every other time Ajax, http, Ajax, http…

I cannot find out why it seems to be resetting every other sort click.

birds_controller.php

function index() {
    $birds = $this->paginate('Bird');
    $this->set(compact('birds', $birds));
}

index.ctp

<?php
$this->Paginator->options(array(
'update'      => '#birdTable',
'before'      => $this->Js->get('#busy-indicator')->effect('fadeIn', array('buffer'    => false)),
'complete'    => $this->Js->get('#busy-indicator')->effect('fadeOut',   array('buffer' => false)),
));
echo $this->Html->image('indicator.gif', array('id' => 'busy-indicator', 'style' => '    display: none;'));
?>

<div id="birdTable">
...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:03:03+00:00Added an answer on May 24, 2026 at 2:03 am

    I solved this, BUT I don’t like this solution. It’s on the lines of what I originally suspected. The buffer was not calling the correct data, and so I added:

    echo $this->Js->writeBuffer();
    

    to the index.ctp and now it works as expected. So I have a copy of the buffer still in my default as well for other scripts…

    Does not seem right, but at least it works now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to write a quick plugin that will load some AJAX content into
I wanted to set some handler for all the unexpected exceptions that I might
I'm trying to write a shell script that, when run, will set some environment
I have java script code to set some of the properties of ajax controls.
I am currently working on some Ajax heavy code and I am wondering how
I have an ASP.NET 3.5 page with some AJAX, some Validators and some business-rule
I'm working on an ASP.Net application and working to add some Ajax to it
I have some simple ajax code. All I want to do is load a
How do I create some simple ajax rating like there is on this page
I want to set some attributes just before the object is serialized, but as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.