SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    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!



    Link: http://www.sidstudio.nl/sid32/projec...bius-kerk.html

  2. #2
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    Posts
    749
    Mentioned
    4 Post(s)
    Tagged
    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:

    Code:
    <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
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    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:
    <?php
      
    include "includes/header.php";
    ?>

    <!-- some content -->

    <?php
      
    include "includes/project-widget.php";

      include 
    "includes/footer.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: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }


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
  •