Targeting Frames in HTML: Code to Open Pages in Each Frame

  • Context: HTML/CSS 
  • Thread starter Thread starter kasi9
  • Start date Start date
  • Tags Tags
    Frames
Click For Summary

Discussion Overview

The discussion revolves around targeting specific frames in an HTML frameset to open pages within those frames. Participants are seeking solutions to ensure that links open in designated frames rather than the default frame or the link page itself. The scope includes technical explanations and troubleshooting related to HTML frame targeting.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant suggests using <frame name="contentFrame"> to define frames and then using <a href="..." target="contentFrame"> to link to the desired frame.
  • Another participant expresses difficulty in getting the links to work, indicating that they placed <frame name=> in the content page instead of the frameset page.
  • A participant notes that naming frames in the content pages will not work and emphasizes the need to define frames in the frameset page.
  • One participant expresses frustration, stating that despite renaming frames, the links still open in the link page, suggesting a possible misunderstanding of the setup.
  • Another participant requests to see the code being used to better diagnose the issue, indicating that the lack of visibility into the code makes it difficult to provide assistance.

Areas of Agreement / Disagreement

Participants generally agree on the need to define frames in the frameset page, but there remains disagreement and uncertainty regarding the specific implementation and troubleshooting steps, as some participants continue to experience issues.

Contextual Notes

Limitations include the absence of specific code examples from the original poster, which hinders the ability of others to provide targeted assistance. There may also be misunderstandings regarding the structure of the HTML frameset and how links are intended to function within it.

kasi9
Messages
4
Reaction score
0
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
 
Technology news on Phys.org
Try
Code:
<frame name="contentFrame">
where you define your frames, then
Code:
<a href="..." target="contentFrame" ...>
 
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 doesn't work, any more ideas?
 
kasi9 said:
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 doesn't work, any more ideas?

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.
 
kasi9 said:
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 doesn't work, any more ideas?

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.
 
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
 
kasi9 said:
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

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.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
4
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K