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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:34:37+00:00 2026-06-15T02:34:37+00:00

I need to dynamically load/render part of a page in nodejs (v1.8.15) with express

  • 0

I need to dynamically load/render part of a page in nodejs (v1.8.15) with express (>3.0) framework. Generally, I want to create a single-page app.

I have a menu at the top of the page with links. Clicking on the links will change the content below, as in AJAX page loading.

For example:

>home|login|signup|chat
..content for home..

If I press the ‘signup’ link:

home|login|>signup|chat
..content for signup..

In express I have routes on the server:

var express = require('express');
var app = express();

app.get('/signup', function(req, res) {
    // render signup.jade
    res.render('signup');
}
app.post('/signup', function(req, res) {
    // .. work with information
    if (ok) res.send('ok', 200); else res.send(error, 200);
}

After reading this, I figured out that I should use socket.io. I know sockets well, so it will be easy to send data about ‘clicking on link’ from the client to the server.

Q1: How do I render/load pages dynamically like I wrote in express?

Yes, I could use AJAX for page loading, but will it work for .post methods in express?
How should I organize my thoughts to create such a site?

By the way, I’ve read about Derby and SocketStream, but I didn’t understand.

Q2: Can I use Derby or SocketStream in my aims (site functions: login, signup, chat)? How?

If SocketStream is what I need, that would be very bad, because Heroku doesn’t work with it.

  • 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-15T02:34:38+00:00Added an answer on June 15, 2026 at 2:34 am

    Q1) This is in fact very simple, no need for Socket.io, Derby or whatever. You can call any expess route with any method through ajax, using jQuery makes ajax very easy. In your example, let’s suppose your container HTML file has a div with id ‘container’, which is where you want the ajax-loaded content to go:

    $.ajax({ url: 'http://yoursite.com/signup'
         , type: 'GET'
         , dataType: 'html'
        })
    .done(function(data) {
      $('#container').html(data);
    })
    .fail(function() {
      console.log("Something went wrong!");
    });
    

    Express supports all HTTP verbs (GET, POST, PUT etc.). For loading pages dynamically, use GET, then when a user enters some login information you can POST it to an Express route that will tell you if it is valid or not, and you use jQuery to modify the DOM accordingly.

    Q2) As said in Q1, no need to use Derby or SocketStream. Plain old jQuery + basic Express will get you where you want!

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

Sidebar

Related Questions

I have a page that I need to dynamically load ajax content when the
I need to dynamically load banner images into a HTML5 app and would like
I'm working on an app where we need to dynamically load (don't ask) angular.js
For an application I am writing, I have the need to dynamically load content
I have instances where I need to dynamically load 5-10 literals with the same
I need to dynamically load a CSS stylesheet into a page that's on a
I have a situation where I need to dynamically load a URL prefix. I
My android app supports all screen sizes, but sometimes I need to dynamically load
Question Updated for Bounty In Flash I need to load a dynamically generated XML
I need to dynamically create textbox. This is my code, but with this I

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.