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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:05:12+00:00 2026-05-11T18:05:12+00:00

There are 2 html files, file-1.htm and file-2.htm. There is another html file, test.htm,

  • 0

There are 2 html files, file-1.htm and file-2.htm. There is another html file, test.htm, with a drop-down having 2 values, “Load Sample-1” and “Load Sample-2”.

This is what I am trying:
When “Load Sample-1” is selected from the drop-down, file-1.htm should be loaded as a nested html in test.htm.

Right now I am able to achieve this through javascript by having the content of file-1.htm and file-2.htm inside test.htm. Bt as the drop-down grows bigger, test.htm would become huge. How can this be achieved by having separate html files for each entry in the drop-down?

  • 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-11T18:05:12+00:00Added an answer on May 11, 2026 at 6:05 pm

    Why don’t you just use an <iframe>, and then have the JavaScript dynamically change the source of the iframe?

    Here’s a bare-bones page demonstrating how to use this:

    <html>
    <head>
    <script type="text/javascript">
    var changePage = function() {
        var iframe = document.getElementById("myiframe");  // One of the many ways to select your iframe
        var select = document.getElementById("pageselected");
        var url = select.options[select.selectedIndex].value;
        iframe.src = url;
    }
    </script>
    </head>
    <body>
    <select id="pageselected">
        <option value="page1.html">Page 1</option>
        <option value="page2.html">Page 2</option>
    </select>
    <input type="button" onclick="changePage()" value="Change Page" />
    <iframe id="myiframe"></iframe>
    </body>
    </html>
    

    You may be asking yourself “why did he not just use onchange for the <select>? Well, I’ve got a little war going with <select> + onchange that I detail here, but basically using it makes your website completely inaccessible to keyboard-only users who are using Internet Explorer 6 or 7. (Not sure if it is still broken in 8.)

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

Sidebar

Ask A Question

Stats

  • Questions 212k
  • Answers 212k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer My first instinct is to point you towards the BroadcastReceiver… May 12, 2026 at 10:21 pm
  • Editorial Team
    Editorial Team added an answer I ended up using the -r option and sending it… May 12, 2026 at 10:21 pm
  • Editorial Team
    Editorial Team added an answer The better event to handle here is KeyDown. KeyDown will… May 12, 2026 at 10:21 pm

Related Questions

I have a requirement to export a dataset as a CSV file. I have
Background: Here the goal is to do some basic commands in powershell using select-string.
I have found several other questions here on S.O. (and the web in general)
I'm having some concurrency issues with a webpage I'm building. Basically, I have three

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.