View Full Version : iframes and links problem

05-24-2007, 11:56 AM
I have a problem, here is a web
that I made for myself:


there are two iframes with content, on the left and right side.
they are identical, except one displays content from:
and the other one from:

we'll use a code for a left iframe for reference:

<iframe frameborder="0" height="265" width="138" scrolling="no"
src ="http://michaelselitegroup.com/layout_columns/left.html">


The problem is: clicking on a link in an iframe, results in changing a page in that little iframe.

Which I don't want to happen.

I want: clicking on a link in an iframe result in changing content on a whole page and forwarding to that link I clicked.

How do I do that?

PS: Someone suggested me an alternative way to achieve the same effect
<?php include("http://michaelselitegroup.com/layout_columns/left.html") ?>
and it didn't work, I just get blank space.

If iframes won't work for me - is there any way to display content from another page in a window, where after clicking on a link it redirects you to the actually link????

You help is greatly appriciated.

Mr J
05-24-2007, 02:54 PM
Try adding


to your link, see if that works

05-24-2007, 03:23 PM
I do not think that target="_top" will do what he is looking to do....

question for you evrand....You want it so that when you click a link from a side menu it loads that "information" in the the white area in the middle of the left and right menu.

If that is what you are wanting to do then just make the white area a third iframe. Here is the basic of what you need...

<iframe name=leftmenu scr="leftmenu.html">

<iframe name=mainarea scr="welcome.html">

<iframe name=rightmenu scr="rightmenu.html">

note the "welcome.html" is there so that when you load your homepage you do not have just a white block...but if you like the white block then just leave that part blank...

NOTE: this next code is the "leftmenu.html

<a href="pageONE.html target="mainarea"></a>
<a href="pageTWO.html target="mainarea"></a>
<a href="pageTHREE.html target="mainarea"></a>

OK now what this does is it makes it so when you open a link the only area that has to load is the text area that makes loading the page faster since they do not have to load the header,top menu , left menu, right menu, or the footer. If your site has tons of pages and is hard to navigate then do not use this method bacause I do not know if you can bookmark a link that is opened in an iframe....I know frames you could not but I have not tested this with an iframe yet.

If you use the "_top" method then on every page you will have to add in the code for your header, menus, and footer....but it is up to you.

05-24-2007, 11:57 PM
Thank You Mr J! You gave me a solution to a problem, which I was looking for a week now, on several forums. No one told me about that simple code, so thanks!

Thank You dcanup! You gave me codes that I didn't need, but now I have an idea and going to use them!

I was looking for a good forum where I can get help with html & css. This forum looks very good and active =)

I am going to stay here, since i get so many questions time-to-time... =)