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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:55:02+00:00 2026-05-21T16:55:02+00:00

I had a thought and wanted to pass it by my pears before I

  • 0

I had a thought and wanted to pass it by my pears before I spend hrs coding this up.

I have a php include file that contains the master nav.
The master nav is made up with ID’d div’s

On each page the php is included has a javascript that runs a “getbyid” and collapse the div id that contains the page link that you are on and expands an already hidden div that contains a “active/highlighted” icon/text that indicates what page you are on.

This way you have the joys of a master php nav, easy to edit and yet dynamic and user friendly.

How does this method sound to anyone else?

As I am typing this I know this will not always work if JS is disabled or not installed. Could this function be accomplished through php alone.

Thank you in advance for any ideas or additions you care to make.

  • 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-21T16:55:03+00:00Added an answer on May 21, 2026 at 4:55 pm

    Get a couple of pages working in straight HTML and JS first, identify the bit that changes between those 2 pages, and then get PHP to output that change.

    IF these pages are also expected to send GET or POST calls which PHP is supposed to act upon, then it is doubly important to make sure you have got code which basically works before bringing PHP into the mix.

    Also, to avoid other annoying errors make sure each ID on each page is unique.

    Hope these hints from one of your peers save you a bit of sanity. 🙂

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

Sidebar

Related Questions

I originally had this code which I mistakenly thought would do what I wanted
I thought I had resolved this but I obviously haven't and was hoping someone
I thought I had this figured out but it turns out I'm just deleting
I had a wild thought today. I've been discovering that my users like my
So, thought I had this working last night, couldve sworn it. Now it no
I have a client that wanted their sales staff to be able to populate
I wanted to do this because i wanted to have a master page bound
I have some code that I had to write to replace a function that
I had a few questions in a technical interview that I thought I knew,
I have just written some code, which as i was writing i thought, this

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.