I already use the official method from W3C HERE to include my HTML Files into my Index.html.

But I can’t figure out how to load for Example 5 Different HTML Files in my Content area on Button Click?

What I Mean Is my Content is standard empty…

When I click button1 - html1 need to be included, 
When I click button2 - html2 need to be included , 

Simply when I click an Button the old included html need to disapear and the new one loaded.

Any ideas how to do this?


This forum is about about the editor, not generalcoding problems.


Now it is uncategorized and everything is fine! :slight_smile:

Ps. It is not only about the Editor


That’s correct, it’s about Atom and Electron.

There might have been cases, where an off-topic post has been answered, but personally I think these should be closed by the moderators so we can stay on-topic.


In addition to the off-topic concern, the question isn’t easily answerable. When you do seek out an answer at a place designed for general JavaScript questions, such as StackOverflow or one of the many forums about web development, you should do the following things:

  1. Clearly label your question. Using a single tag attribute is not very informative about what you’re looking for. It’s also not correct, because you aren’t asking about w3-include-html. You’re asking about how to change the contents of your page using a JavaScript event bound to a button (I’m not sure that even merits a forum question, because Google knows exactly how to solve it). The fact that the content is being sourced from multiple files is important for the final implementation, but not the actual question you’re asking.

  2. Make sure to include a link to your existing project (having a GitHub repo is as good as gold when you’re trying to get code help online) or the code itself (properly formatted as code). If you don’t, you are forcing anyone who helps you to write a blank HTML page and JavaScript code from scratch, which is more time-consuming than it would be to modify your code. By sharing your code, you also send important signals to the people helping you about your skill as a developer. Good teachers will pick up on these signals and adjust their answers to provide you with extra information if they think you need it.

  3. Remember that people do this because we have some free time and enjoy helping people. Nobody is obligated to give you code, and you can greatly increase your chances of getting high-quality help by being as easy to help as possible. That includes the first two points, and also includes not arguing with regulars when they tell you that your question isn’t appropriate for the category or web site.