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 8440871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:25:05+00:00 2026-06-10T08:25:05+00:00

I have tried pjax examples in chrome and firefox, i took the sample code

  • 0

I have tried pjax examples in chrome and firefox, i took the sample code and placed it into my own app but it still does a full page reload. The AJAX request happens then the page moves on without updating the #main div

<html>
    <head>
        <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.0/jquery-1.8.0.min.js"></script>
        <script src="http://localhost:8888/jul/js/jquery.pjax.js"></script>


         <script type="text/javascript">
            // $(document).ready(function(){
            //   $('a[data-pjax]').pjax();
            // })

        // $(document).ready(function(){
        //     $('a').pjax({

        //    container: '#main'
        //  })
        $('document').ready(function(){
           $('ul a').pjax('#main')
        });


         </script>
    </head>
    <body>
        11:59:36        <div id="main">
             <div class='loader' style='display:none'><img src='http://localhost:8888/jul/imgs/spinner.gif'></div><ul>

  <li><a data-pjax='#main' href="/jul/stats/pjax_stats/index/">Index</a></li>
  <li><a data-pjax='#main' href="/jul/stats/pjax_stats/total_posts/">total_posts</a></li>

  <li><a data-pjax='#main' href="http://localhost:8888/jul/stats/pjax_stats/index">Index</a></li>
  <li><a data-pjax='#main' href="http://localhost:8888/jul/stats/pjax_stats/total_posts">total_posts</a></li>
  <li><a href="http://localhost:8888/jul/stats/pjax_stats/total_graph">total_graph</a></li>
  <li><a href="http://localhost:8888/jul/stats/pjax_stats/twitter_graph">twitter_graph</a></li>
  <li><a href="http://localhost:8888/jul/stats/pjax_stats/facebook_graph">facebook_graph</a></li>
</ul>index files




        </div>

    </body>
</html>

I have tried multiple methods to invoke pjax and maybe someone else could point out where i am going wrong? The Ajax/GET seems to return fine in firebug console- this is an example of my php that produces the pjax response

public function total_posts(){
        // print_r($_SERVER);

        if (!isset($_SERVER["X_PJAX"])) {
            $this->load->view('stats/pjax_stats/header');
            $this->load->view('stats/pjax_stats/links');
        }else{
            echo "pjax";//add in for debug
        }

        echo "total posts";

        if (!isset($_SERVER['X-PJAX'])) {
            $this->load->view('stats/pjax_stats/footer');
        }



    }

A bug?

There seems to be a bug in the latest version where the append variable to the end of the url where the ajax request is made to is _pjax=container instead of _pjax=true

  • 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-06-10T08:25:06+00:00Added an answer on June 10, 2026 at 8:25 am

    Have you tried setting the timeout higher (default < 1s )?

    For example:

    $('document').ready(function(){
      $('ul a').pjax({
        container: '#main',
        timeout: 5000 #ms
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried multiple variations of the following code, but I still get the
I have tried multiple date formats, but still I get nil back: Thu May
I have tried different examples to filter a gridview by dropdownlist, but is it
I have tried searching over the internet about this problem but not able to
I have tried many permutations but they all don't seems to work well. Am
I have tried to create a simple controller/model (based on the samples code of
Have tried to fix this on my own and so far failed. The yellow
I have tried gaussian blur and checked out all the questions on stackoverflow but
I have tried this but Contacts were not added! ContentResolver cr = this.getContentResolver(); ContentValues
Have tried to compile and run this program, but have received this error message

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.