Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    iframes and links problem

    I have a problem, here is a web
    that I made for myself:

    www.michaelselitegroup.com

    there are two iframes with content, on the left and right side.
    they are identical, except one displays content from:
    http://michaelselitegroup.com/layout_columns/left.html
    and the other one from:
    http://michaelselitegroup.com/layout_columns/right.html

    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">
    </iframe>


    Now!

    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.
    Last edited by ervand; 05-24-2007 at 11:06 AM.

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Try adding

    target="_top"

    to your link, see if that works
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #3
    New Coder
    Join Date
    Dec 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...

    Code:
    <iframe name=leftmenu scr="leftmenu.html">
    </iframe> 
    
    <iframe name=mainarea scr="welcome.html">
    </iframe> 
    
    <iframe name=rightmenu scr="rightmenu.html">
    </iframe>
    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
    Code:
    <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.

  • #4
    New Coder
    Join Date
    May 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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... =)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •