SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2007
    0 Post(s)
    0 Thread(s)

    iframe link --> redirecting parent page

    Dear fellow webdesigners,

    I realize the thread title sound a little bit vague, as i find it difficult the briefly explain the exact problem.

    I'm currently designing a website for a Dutch architecture firm.

    the website contains a portfolio, with different pages for each of the projects they have done.

    One each of these project pages there is a small list of thumbnails linking to other projects in the same categorie (so people can quickly change between projects)

    I decided to load this thumbnails list using an iframe, so i wouldn't have to alter all old projects when a new project has to be added.

    the problem now is, that when you click on one of these thumbnails the new project page is loaded within the iframe a not on the whole page.

    Does anybody if there is a way to fix this?

    Alternatively: if anybody knows a better way to make this work, maybe using javascript? let me know, help will be greatly appreciated!


  2. #2
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    4 Post(s)
    0 Thread(s)
    I may be missing something, but why not use a server side include to add this content?

    Otherwise, add the target="_parent" attribute:

    <a class="first-image" target="_parent" href="banner-tue.html"><img src="images/banner-tue/thumb-small.jpg"></a>
    <a target="_parent" href="eusebius-kerk.html"><img src="images/eusebius-kerk/thumb-small.jpg"></a>
    <a target="_parent" href="bread-butter.html"><img src="images/bread-butter/thumb-small.jpg"></a>
    <a target="_parent" href="malaria-no-more.html"><img src="images/malaria-no-more/thumb-small.jpg"></a>

  3. #3
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Sydney, Australia
    11 Post(s)
    0 Thread(s)
    I agree with Victorinox, it would be far easier to use server side includes, it will also give you much more flexibility in the future if ever something needed to change.

    In PHP for example, you could do something like this:

    PHP Code:
    include "includes/header.php";

    <!-- some content -->

    include "includes/project-widget.php";

    Of course you don't have to change how you've done everything, you could just use it for including the "project-widget" where you want to.
    var details = {
    . . web: "",
    . . photos: "",
    . . psa: ""


Posting Permissions

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