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

  • Home
  • SEARCH
  • 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 895939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:38:33+00:00 2026-05-15T14:38:33+00:00

So I am trying to have a dynamic tabs kind of thing using both

  • 0

So I am trying to have a dynamic tabs kind of thing using both php and javascript. To make it much easier to understand, remember the two choices on facebook (Recent news and most recent) or something like that, when you click on one of them it just changes the content that you see in the middle without updating the page. i know how to delete the content in a div for example, but after deleting the content in the div (innerHTML = “”) I want to populate it with the option chosen from the database.

So let’s say I have an option (all) and an option (only this)
The default is all so when I run the page, I will just get all. However, if I click on only this, it will clear the div “my header” and will replace the content with the latest content from the database (database) and display it.

For that I need both php and javascript, is there a sample or an easy way to do this before i start digging around.

((Sorry if is not clear but the facebook example should be clear enough))

  • 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-15T14:38:33+00:00Added an answer on May 15, 2026 at 2:38 pm

    Whatyou are looking for a is AJAX/PHP approach.

    • Clicking on the tab
    • The current content gets removed. This is possible because it has a unique “id” attribute in the HTML code
    • The server is asked for the new content. This is the AJAX request that will be triggered after/while/… the content is removed.
    • The server sends back the code. This can be HTML, JSON, XML or similar.
    • You script recieves the answer, may “do” something with it (like some parsing or similar)
    • The content will be placed on the page (again, this is possible due to an unique “id”

    This is basically the way it is done.

    Check out the different JavaScript frameworks. They all come with nice AJAX support:

    • jQuery
    • MooTools
    • dojo
    • Prototype

    And of course, SO is also a nice place to look at: https://stackoverflow.com/questions/tagged/ajax+php

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

Sidebar

Related Questions

I am trying to create a dynamic bar in HTML using javascript. I have
Here's the problem I'm trying to solve: I have a dynamic php-driven website that
I'm presented with a problem using PHP and MYSQL. I have a dynamic list
Im trying to make a custom view that will have a dynamic number of
I'm trying to make an editable table. I have a dynamic table, columns can
I have a report where I'm trying to get the sum of a dynamic
Trying to have my PHP script return some SQL table queries. Here's my script
I have application like where i can create dynamic tabs. and delete cross bar
i've been trying to have a dynamic ContextMenu to show the name property of
I have a dynamic list of LI's inside of a UL. 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.