Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Targeting frames

  1. Jan 29, 2008 #1
    in html, i have coded a site with 8 frames i'd say approx, i have a menu with links, when i click on the link i want a page to open in a particular frame, so how do i target it, please give me code, ty

    btw _self, _blank etc don't work, i think i need to some how name the frames, to open up pages in each of them
  2. jcsd
  3. Jan 30, 2008 #2


    User Avatar
    Science Advisor
    Homework Helper

    Code (Text):
    <frame name="contentFrame">
    where you define your frames, then
    Code (Text):
    <a href="..." target="contentFrame" ...>
  4. Jan 30, 2008 #3
    i put <frame name=> in the page i want the link to open in

    and the <a href...> link in the other fram where the links go

    but it still does'nt work, any more ideas?
  5. Jan 30, 2008 #4
    CompuChip's suggestion is the way to do this, but there could be other problems depending on how you are linking to the other page which is really hard to determine without looking at your code.
  6. Jan 30, 2008 #5


    User Avatar
    Science Advisor

    If you're using frames, then you have a main html page - the frameset page - which contains all the other frames, plus some content pages which have the content for each frame.

    Go into the frameset page and name the frames. Adding <frame name=> into a content page will not do it - it may be obvious but from what you said it sounds like that's what you did.
  7. Jan 31, 2008 #6
    well guys i'm trying, i renamed some of the frames, and whe i click the link it opens the page in the link page :(

    i appreciate ur help so far, but this seems impossible
  8. Jan 31, 2008 #7
    I'll say this again that it is really difficult to help you find the problem when none of us knows exactly what you are doing, if you would post some of the code you are working on it is more likely that someone would be able to spot the problem.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook