Results 1 to 3 of 3

Thread: IFrame question

  1. #1
    Join Date
    Oct 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question IFrame question

    I've been using HTML to make sites for some time now, and I have the same problem with every site I make - My navigation bars are very tedious to update, because i have to go through page after page to change the bar so that it's the same on every page.

    To change this, I decided to put my sidebar in an IFRAME and make it look seemlessly like part of the page. Silly me, I thought that if someone clicked on a link in the iframe that it would follow the link in the same window that CONTAINED the iframe, but of course, it just changes the page inside the iframe itself. I would like to know if there is a way that I can get any links inside the iframe to make the entire page change, not just the iframe.

    If you're having trouble understanding what I mean, let me give you this example.

    I have a web page. Call it page A. Page A contains an Iframe. inside the iframe is Page B. I want any links on Page B to change Page A, not Page B.

    btw, the contents of the iframe belongs to me, so I can edit what's inside the iframe.

    If all of this is impossible, then does anyone know of a good way to manage navigation bars without having to go through every single page it's on and edit the html?

  2. #2
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    you can use:

    Code:
    <a href="somewhere.html" target="_parent">Click me from within IFRAME</a>
    However, why not just use a PHP "include" for your menu to keep from having to use IFRAMES?
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  3. The Following User Says Thank You to TheJoshMan For This Useful Post:

    Maynard (10-12-2008)

  4. #3
    Join Date
    Oct 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot for the code. And, I would use PHP but i've never used it before and not exactly sure what to do with it.

Bookmarks

Posting Permissions

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