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

  • Home
  • SEARCH
  • 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 6048869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:30:42+00:00 2026-05-23T07:30:42+00:00

I get one tutorial over here http://codeigniter.com/forums/viewthread/122597/P0/ everything is find but not the pagination

  • 0

I get one tutorial over here
http://codeigniter.com/forums/viewthread/122597/P0/

everything is find but not the pagination link.

here’s my code

<script>
    ajax_paging = function()
    {
        $("p.pagination a").click(function() 
        {
            $.ajax({
            type: "GET",
            url: $(this).get(),
            success: function(html)
                     {
                         $("#display-content").html(html);
                     }
            });               
        });            
    return false;
    }; 
</script>

<?php 
    if($num_results == 0)
    {
        echo 'No data result, please insert one';
    }
    else
    {
?>
        <div id="display-content">
        <table width="100%">
        <tr>
            <th>CP code</th>
            <th>Code</th>
        </tr>
    <?php foreach($records as $row){ ?>
        <tr>
            <td align="center"><?php echo $row->created_date?></td>
            <td align="center"><?php echo $row->uid?></td>
        </tr>
    <?php }?>
</table>
 <p class="pagination">
 <?=$pagination?>
    </p>
    </div>
<?php } ?>

here the pagination HTML

    <p class="pagination">
     &nbsp;<strong>1</strong>&nbsp;
<a onclick="javascript:ajax_paging();return false;" href="http://bravonet.my/tombocrm/inside/home_fpr/5">2</a>&nbsp;
<a onclick="javascript:ajax_paging();return false;" href="http://bravonet.my/tombocrm/inside/home_fpr/10">3</a>&nbsp;
<a onclick="javascript:ajax_paging();return false;" href="http://bravonet.my/tombocrm/inside/home_fpr/5">&gt;</a>&nbsp;    
</p>

IWhen i try to click on the pagination link it works like normal link only. the javascript ajax occur error.

i am very weak in javascript. any help would be appreciated and thx in advanced.

  • 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-23T07:30:43+00:00Added an answer on May 23, 2026 at 7:30 am

    1 jquery .get() is for getting DOM elements so you don’t need it here and $(this) inside $(“p.pagination a”).click() references tag, so like in r.piesnikowski’s comment replace $(this).get() with $(this).attr(‘href’)

    2 Don’t put onclick=”javascript:ajax_pagin();return false;” in your tag, instead leave in your tag this snippet (which adds onclick event handler to your tags):

    $(document).ready(function(){
      $("p.pagination a").click(function() {
        $.ajax({
          type: "GET",
          url: $(this).attr('href'),
          success: function(html){
            $("#display-content").html(html);
          }
        });               
        return false;
      });            
    });
    

    3 In your js code there was an error – return false was misplaced and the onclick event didn’t return false itself, ajax_pagin did, that is why the link worked normally.

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

Sidebar

Related Questions

I tried to make an independent copy of an array but couldnt get one.
How would one get columns information on table which he doesn't own, but has
I've been going through the tutorial at hginit.com, but I've found a rather inconvenient
I am reading a tutorial and I looked all over google as well but
I want to get one record before start date and end date DtpFrom means
I need to get one page (can be cURL, or filegetcontent), get some info
Very basic question - how to get one value from a generator in Python?
I have an SPListItemCollection. I basically want to get one of the items (randomly)
How does one get a list of running applications as shown in the "Applications"
How may one get information that was used to programatically generate asp controls? For

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.