0

I have few html pages that I want to call from the left navigation bar. I tried using onclick function but somehow height=100% did not work properly for me.

Now I used a simple solution but after clicking on the link , it replaces the whole page and my navigation bar also disappears .

<div id="mySidenav" class="sidenav">
  <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
  <a href="http://www.google.com">Google</a>
  <a href="https://ca.yahoo.com/?p=us">Yahoo</a>
</div>

I am looking for some solution where my left navigation bar stays the same and by clicking on the links , respective page appears in the right side.

  • This is not really possible. You could use an [iframe](https://developer.mozilla.org/en/docs/Web/HTML/Element/iframe) element to display web pages inside your own page, but pages can check (and many do) if they have been framed and either refuse to work or reload the entire page without your links. Consider creating a link page for your home page or one that gets loaded if you open a new tab. – traktor Dec 27 '16 at 21:12
  • For foreign pages it's about iFrames. Otherwise check http://stackoverflow.com/a/31845361/3096717 – anton Dec 27 '16 at 21:14

0 Answers0