Frame/iframe question

Discussion in 'HTML & Website Design' started by BioSpherical, Apr 21, 2008.

  1. #1
    Hi

    Very simple question (I hope):
    Basically, I have a website which sells a script and I'd like the demo to appear in a frame. I've got so far:
    http://www.countryonsale.com/demosite.php

    However when you click on anything in the demo site (in the frame), you are directed out of the frame. I just need the frame to stay there so the visitor can browse the demo site and always have the link back to the main site.

    Any help will be appreciated!
     
    BioSpherical, Apr 21, 2008 IP
  2. osdude

    osdude Peon

    Messages:
    76
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    target="_self"
    PHP:
    to the link should do the trick. Actually, I thought if you did not add a target, the target was the frame.
     
    osdude, Apr 21, 2008 IP
  3. BioSpherical

    BioSpherical Active Member

    Messages:
    874
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    90
    #3
    Where should I put this?
    And if you check, the frame remains when you click on countries, just not when you click the other links...?
     
    BioSpherical, Apr 21, 2008 IP
  4. osdude

    osdude Peon

    Messages:
    76
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    <a class="nav" href="../continents.php" target="_top">Continents</a>

    "_top" starts a new frameset. Changing those to "_self" should help

    There are also a few things in the code that are going to cause issues

    "//" there are a few of those.

    links are document relative. I prefer site relative, particularly when there are errors, it helps clear up some issues you may run into.
     
    osdude, Apr 21, 2008 IP
  5. SZ4h(dot)CoM

    SZ4h(dot)CoM Banned

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    and you can use <base target="_self">
    between the head section
    and for any other link that you want to open in the frame just override the code in it's <a> start code
    as osdude said
    <a class="nav" href="../continents.php" target="_top">Continents</a>

    it will be more easier to have all links with the target prop.
     
    SZ4h(dot)CoM, Apr 22, 2008 IP
  6. BioSpherical

    BioSpherical Active Member

    Messages:
    874
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    90
    #6
    I'm looking for a fix which I won't have to edit the code at the demo site for.
    So, I can edit code in demo.php and demosite.php but is it possible to get the frame to be permanent without having to edit the code at the actual demo site?
    Thanks for the help so far.
     
    BioSpherical, Apr 22, 2008 IP