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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:29:56+00:00 2026-06-15T18:29:56+00:00

I have to implement a list in my website, that behaves as follows: 1.

  • 0

I have to implement a list in my website, that behaves as follows:

1. In the home page, a list is rendered and shows only the first 12 items, and after that a “load more…” button.

2. Right after the page finished loading, the next 12 data should be pre-loaded.

3. When clicking “load more” the loaded 12 are rendered, right after that the next are pre loaded, and so on again and again…

My app is using node.js, express.js, jQuery, ejs and bootstrap.

Right now, my server logic produces the list of data successfully, then I use ejs template to render the whole big list.

I’m quite confused about how to change that to be a dynamic list using ajax.

Will the “first render” should still be done using ejs from the server, and then any adding of list items will be rendered again using ejs, but this time from the client side? What is the best/simple way to implment the behavor I need? BTW – every list item, includes an img tag, that direct to a unique image – isn’t that a problem when using JSON … ?

Any help, or a link to helpful example – will be very appreciated. Thanks.

  • 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-15T18:29:57+00:00Added an answer on June 15, 2026 at 6:29 pm

    You have two options for your AJAX call as far as I can tell. One is to return JSON to the browser and use a client side template library to render the data. The other option is to render just the list on the server and return the HTML to the browser which you can then insert straight into the DOM.

    You will need to set up a different route in express so that it only returns either the JSON or the HTML for the list items, rather than the entire HTML document from the first load.

    The advantage of returning HTML to the browser is that you don’t need to load a template engine on the browser or have template logic in both the browser and the server which reduces your code size and keeps everything DRY. However, if you have a need to store the data in browser memory to perform other manipulation then JSON is your best bet.

    I’m happy to expand on any point that you need to make things more clear.

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

Sidebar

Related Questions

I'd like to implement a ListView that will have a list of SelectedItems as
I have implement FragmentPagerAdapter in my app but it show only a same list
I have a website which has a web page containing list of logs. Now
I have to implement a one linked list but it should put object in
I have a Linked List and I want to implement a function: Random_Shuffle_List (struct
Some open source libraries have tendency to re implement basic structures like string, list,
I am trying to implement image as checkbox. I have a list with 2
I'm trying to implement a custom validation annotation in Seam. We have a list
I have a website that lets people view rows in a table (each row
I have a django website that is spilt depending on what user type you

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.