HTML Frames hyperlinking help

Discussion in 'HTML & Website Design' started by yeaulman, Jan 30, 2007.

  1. #1
    I am redesigning the website for www.cherryhills.ca I have 3 frames, top left and main. I have a menu on the left where it points to the different parts of the website. When i create a hyperlink in the left, I want it to open in the main frame, but when I did that, it opens it up in a new window.

    Is there code to fix this? I know there is but am just lost.
     
    yeaulman, Jan 30, 2007 IP
  2. rgchris

    rgchris Peon

    Messages:
    187
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Use the target attribute to point the hyperlink to open in the right frame.
     
    rgchris, Jan 30, 2007 IP
  3. Ginger Ninja

    Ginger Ninja Guest

    Messages:
    161
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ^^ You should give your right frame a name then use that name as the target... Obviously.

    However, I would highly recommend that you don't design using frames. It's old and search engines can't read your content.
     
    Ginger Ninja, Jan 30, 2007 IP
  4. rgchris

    rgchris Peon

    Messages:
    187
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yeah, I'd have to discourage using frames too.
     
    rgchris, Jan 30, 2007 IP
  5. yeaulman

    yeaulman Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I have never done a website before, how do you go about all this with no frames
     
    yeaulman, Jan 30, 2007 IP
  6. Ginger Ninja

    Ginger Ninja Guest

    Messages:
    161
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ahh. That's the million dollar question, in a sense. For me to describe it to you would be impossible. I suggest you download some open source templates and start playing with the CSS and HTML to see what things do. I've always been a supporter in learning things practically so instead of reading tutorial after tutorial just throw yourself in there and see if you can grasp it.

    I would recommend that you look into what each CSS tag is (through Google) when you come across them in the stylesheet. This will help you understand what that tag does and, if you're creative enough you can think of ways to to use them in your project.
     
    Ginger Ninja, Jan 30, 2007 IP
  7. Bween

    Bween Peon

    Messages:
    29
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    It may be a little difficult for me to explain, but what I do involves a bit of PHP.

    I create the entire web page in HTML without content. You will have to lean to use CSS, and HTML quite well.

    Now that you have your template, take everything above where your content goes and put it into a new file called head.php. Take every thing below your content area and create a file called foot.php.

    All you have to do at this point is make pages, after you have all of your content written out into a blank file (no main body html tags, i.e. <html> <body> <head>) at the top of your page write this.
    <? require"./head.php"; ?>
    and at the bottom:
    <? require"./foot.php"; ?>

    ./ indicates the folder you are in.
    ./<-- current directory
    ../<-- parent directory
    .../<-- parent of parent.

    so if you have your head.php and foot.php in a directory called template you would have to write;

    <? require"./template/head.php"; ?>
    <? require"/template/foot.php"; ?>

    save all of these pages also as .php pages.

    this code requires that if your content page loads, then you head.php and foot.php are required for that page to display.

    If this is confusing I will type out some code visual examples or write a tutorial if a few wish it.
     
    Bween, Jan 30, 2007 IP
  8. Ginger Ninja

    Ginger Ninja Guest

    Messages:
    161
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Yeah, those and PHP includes can be useful :)
     
    Ginger Ninja, Jan 30, 2007 IP
  9. yeaulman

    yeaulman Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    But for now is there an html code that will allow me to have the link open in the main frame? I just need to get the new site up and running ASAP for the home show coming up next month.
     
    yeaulman, Jan 30, 2007 IP
  10. unitedrokz

    unitedrokz Peon

    Messages:
    86
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #10
    yes just like a couple of others have already said....give your main frame a name
    eg. name="mainFrame"

    then add this to all your links
    target="mainFrame"

    so an example of one of your links would be.
    <a href="example.html" target="mainFrame">go to example</a>
     
    unitedrokz, Jan 30, 2007 IP
  11. yeaulman

    yeaulman Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I have that for code and it still opens up in a new window :(
     
    yeaulman, Jan 30, 2007 IP
  12. Ginger Ninja

    Ginger Ninja Guest

    Messages:
    161
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Ginger Ninja, Jan 30, 2007 IP
  13. unitedrokz

    unitedrokz Peon

    Messages:
    86
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #13
    can you put up a link to the new site so we can have a look....or post up the code
     
    unitedrokz, Jan 30, 2007 IP