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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:23:57+00:00 2026-06-05T14:23:57+00:00

Here is a quite straight forward jQuery code I find on one site: //It

  • 0

Here is a quite straight forward jQuery code I find on one site:

//It simply loads more news
  function ReadMore(page){
       $("#news-list").html('Loading More News...');
       $("#news-list").append('<img src="/images/loading.gif">');   
        next=parseInt(page)+1;      
        html=$.get('/morenews.php','page='+page,function (data){                
            $("#News").append(data);
            $("#news-list").html("<a href='javascript:void(0);' onclick='ReadMore("+next+");'>More News</a>");
        });         
}

My question is:

  1. What kind of datatype is it using? “Expected data type of the response. One of: null, ‘xml’, ‘script’, or ‘json’. ”

  2. What is html=$.get('/newread.php','page='+page,function (data){} in jQuery? I have never seen $.get and there seems to be one parameter page.

  3. Does the server receive something like this: /morenews.php?page=3

  4. This code cant deal with errors. If the server is too busy, let’s say, doing nothing for 20 seconds, how can I add some error messages?

By the way, jQuery seems to be a weird language because it constantly create anonymous functions.

  • 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-05T14:23:59+00:00Added an answer on June 5, 2026 at 2:23 pm
    1. page is an integer (although it gets typecast to a string when sent to the server as part of an HTTP GET request). data is an html string.

    2. See jQuery.get( url , data , success() ). It’s shorthand for $.ajax(). The success() function is a callback, which gets exectuted once a response is received from the server.

    3. Yes: /morenews.php?page=3

    4. You could try adding a timeout function to cancel the request if there’s been no response within a given time.

    The language is Javascript (jQuery is just a library), and anonymous functions are really cool when you get used to them…

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

Sidebar

Related Questions

My issue here is quite simple : i'm trying to use the jQuery validate
Here's the code, I don't quite understand, how does it work. Could anyone tell,
I've got a quite strange problem here. I'm calling some simple code via Ajax.Updater:
Im using Doctrine and i dont quite understand this code here: $this->hasColumn('id', 'integer', 8,
This is quite straight forward. I'm calling a web-service (.asmx, with session enabled) from
I've got quite a lot of code here, but it's relatively straightforward. This is
i'm quite new with php. i think this is quite straight forward but i'm
I'm quite new here. I have a problem with the new iOS 5.1 slide-in
Here's a question that I don't quite understand: The command, system(pause); is taught to
Quite new to maven here so let me explain first what I am trying

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.