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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:00:35+00:00 2026-05-29T04:00:35+00:00

I have this script which allows to display Bing search results: JsFiddle Demo The

  • 0

I have this script which allows to display Bing search results: JsFiddle Demo

The problem is that it can only show up to 50 result at a time. So I want to make a pagination . So far I have this code which allows to display the second part of the results, with var WebOffset = “Web.Offset=0”;

$("#page2").click(function() {
    WebOffset = "Web.Offset=1";
    var searchTerms = getSearch();
    doSearch(searchTerms);
});

My question: How can I predict how many results there are in total so that I would now how many pagination numbers (divs) to make. But more important this of course has to be ‘automated’. So the code would have to display a set of divs(pagination numbers) based on the bing results in total. I really have no idea were to begin solving this problem. Any help is appreciated.

  • 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-29T04:00:36+00:00Added an answer on May 29, 2026 at 4:00 am

    Since you must have some server side logic in order to get the results, you can request the number of results when a search query is submitted and store it, or, you can get that number with each page request. Also, since it appears you’re using jQuery, this should be easy.

    Here is what these two scenarios could look like:

    First:

    1. The user submits a search query
    2. The server returns the first page of results.
    3. Get total number of results, for pagination controls
    4. The user clicks different page (send a request to the server with the page number)
    5. The server returns the results that correspond to the currently selected page

    And the second:

    1. The user submits a search query
    2. The server returns the first page results, along with the total results count
    3. The user clicks different page (send a request to the server with the page number)
    4. The server returns the results that correspond to the currently selected page

    You can see that in the first scenario, you would have to store the total result count on the client side. As opposed to the second one, where you receive it with every result request.

    Home this helps. Have a great day!

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

Sidebar

Related Questions

I have a script which allows to display Bing search results: JsFiddle I want
I have a script which allows to display Google suggestions: JsFiddle I want to
I have this .bat script which I use to maven package my application. Problem
I have this very simple script that allows the user to specify the url
I have this script which basically toggles a bgColor class on and off so
I have this jquery script which suppose to hide/show div element base on the
I have this PHP script which i'm grabbing images from a directory and displaying
I have this script at the moment, which changes an image when a thumbnail
I have a script which creates a user-defined object like this: obj = new
I have a simple script which is used to start another program. This other

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.