Jump to content
xisto Community
Sign in to follow this  
misterhh

Iframe Menu Question

Recommended Posts

I am trying to make a menu for my site.
I made an HTML page with the text/links of the menu, then I embedded that page in all the main "content" pages using an iframe. The problem is that whenever I click the links in the menu they open INSIDE of the iframe instead of switching the whole browser to the page the link is directed to. I hope I'm not TOO hard to understand. :P

Oh, and on this page it has the perfect example of what I want.
http://www.w3schools.com/tags/tag_iframe.asp
See how when you click on one of the links in the example frame, the whole page changes to that link.

Share this post


Link to post
Share on other sites

The reason why they load in the iframe rather than the parent page is because you did not specify the target for the links in the iframe. You must give the target attribute either _top or _parent as its value.

 

Example:

<a href="#" target="_top">Link</a>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.