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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:22:19+00:00 2026-06-16T00:22:19+00:00

For example, I have profile page and select with ‘About’, ‘Photos’, ‘Videos’ section etc.,

  • 0

For example, I have profile page and select with ‘About’, ‘Photos’, ‘Videos’ section etc., and I don’t want to refresh page each time I change section, I want just to change the content of container with Javascript. Sure it wouldn’t be handy to write markup of pages in Javascript file, and my idea would be to write div’s of each view and display only one of them:

<div id="about>About content</div>

<div id="photos" style="display: none;">Photos content</div>

However, I think there are better ways to do it, because I don’t like keeping hidden views on the page. Also in most cases content in views should be generated by script, so it’s looks like job for a template engine, but I’m not sure there are such in Javascript.

So what would be the best way to implement this in Javascript. I hope my idea is clear. Thanks in advance!

  • 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-16T00:22:19+00:00Added an answer on June 16, 2026 at 12:22 am

    Try use mustache it is a template engine for javascript.

    Also, you can use AngularJS templates (dynamically loaded into page on demand)
    It is very easy to use. (However contains other things you might not want.. but should want 😉 )

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

Sidebar

Related Questions

I want to ask you about profile page url of twitter/facebook. Example : twitter.com/stackoverflow
I have a page, URI looks like this: http://domain.example.com/Profiles/Profile.aspx?username=blah#blahtab When that fragment (#blahtab) is
i would like a simple help... i have a url like this: example.com/profile.php?id= &
How can I hide the parameters in Codeigniter? I have this URL: http://example.com/profile/1 I
If I for example have <p> some long text </p> on my HTML page,
What I want is to have links which change a part of the page
I have 3 MySQL tables representing: photos a user post, videos a user post,
Have a look at this example first, click here . I want you to
For example I have some link in index.html: <a href=message.html>Go to message page</a> In
I have a profile page like so: https://i.stack.imgur.com/Rx4kg.png . In management I would like

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.