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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:55:09+00:00 2026-06-08T02:55:09+00:00

I am using jQuery to load in the 10 newest posts when a function

  • 0

I am using jQuery to load in the 10 newest posts when a function is executed like this:

function loadContent() {

   jQuery("#conz").load("http://mydomain.com/wallload.php?id=1&p=1", function(){
      jQuery("#conz").slideDown(200);
   });

}  

But I want to update the page number when the function is executed. The page number is the “&p=1” in the url of the .load source page. So first of all, I want to insert a variable or string into the url which is set to 1 on page load, but plussed up one every time the function is executed.

So basically, when they click the link to execute the function, it will load the first page. Then the next time they do, it will load the next page, see my point?

I guess this is pretty easy for those of you who know Javascript, but I do not at all, so please help 🙂

  • 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-08T02:55:10+00:00Added an answer on June 8, 2026 at 2:55 am

    keep a variable outside your function and increment it every time you call the function.

    var page=0;
    function loadContent() {
       page++;
       jQuery("#conz").load("http://mydomain.com/wallload.php?id=1&p="+page, function(){
          jQuery("#conz").slideDown(200);
          page
       });
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using jquery.history lugin found here: http://tkyk.github.com/jquery-history-plugin/ With this i load content into a
After loading a PHP template (using jQuery's load function), this simple script won't make
I am using jQuery.load() to render a partial view. This part looks like this:
I'm using JQuery to load the content of an MVC usercontroll: function menuShowModal(a) {
I am loading images externally using jQuery load function.. but not able add light
I am trying to load a part of the page using jQuery load function
I'm trying to load some external content using jQuery load function to div on
I am loading a set of images from another page using jquery load() function.
i am facing an error in Jquery Load function. I am using jquery to
I am using jQuery .load() to load a php-file. This php-file echos out a

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.