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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:57:05+00:00 2026-05-18T08:57:05+00:00

My web site has a common horizontal menu and I’d like to put this

  • 0

My web site has a common horizontal menu and I’d like to put this into a single html file so I only need to change it in one place.

My solution is to put the menu into an iframe and have a DIV id=menu in the main page. In the menuFrame html I have an onload with this:

    <script language="JavaScript">
    function doLoad() {
        window.parent.document.getElementById("menu").innerHTML = document.body.innerHTML;
    }
    </script>

This works fine in IE, Safary, Mozilla but not in Chrome.

Any ideas?

  • 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-18T08:57:06+00:00Added an answer on May 18, 2026 at 8:57 am

    For various reasons relating to usability and browser support; the better choice is pretty much always to not use an iframe for this; but rather include the menu in the text of the page using a server-side language like PHP or similar.

    If, as occasionally happens, your host doesn’t support PHP, it’s time to switch hosting services.

    As for the code itself, it’s pretty simple:

    <?php include '/path/to/menu.html' ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is common practice for coding web applications where part of the site has
My web site has a database lookup; filling out a CAPTCHA gives you 5
I am doing some work on a web site that has a secure area
I am working on a medium size web site that has plenty of custom
I am building a web site where the user has to digitally sign a
My client has recently taken ownership of an existing web site, with final deliverable
I have a web site project with a lot of files, it has become
We have a updatable web site project that is written in c#, it has
I am currently creating a web site with pure HTML ( No frameworks Just
I'm working on an internet application that has been set up as a web

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.