Forum Moderators: phranque
I need to know how to make the target of a link, a specific frame of a different frameset, containing the relevant content page?
eg. If "Sport"link is clicked from homepage, the "Sport" page opens in a new frameset with the "Sport" displayed in the main frame.
Any help would be much appreciated!
If I read your question right there really isn't a "simple" way to do this, that is, anything built into html as it stands today.
There are a couple of javascript solutions that "build" a frameset on the fly. Do a search for "dynamic frameset" to find them. Try out a couple of different ones to find which best suits your needs.
I used to use the one from Netscape DevEdge. Very powerful and flexible and easy enough to tweak the js to use just what you need.
Hint: Depending on how your site is set up the parameter call in the dynamic url might make it appear to SEs and site search functions (if applicable) that there are many extra pages in the site (thispage.htm vs. frameset.com?main=thispage.htm). I found that disallowing the cgi-bin in robots.txt took care of this.
Another Hint: You might also consider using a framebuster script in conjunction with the dynamic frameset to ensure that pages are always displayed in their proper frames.
<a href="sport.htm" target="mainFrame">sport</a>
this will open the page called sport in the mainFrame and leave the left frame as it stands.
I have a homepage composed of frameset's, in the framesets are links to other parts of the site. To minimise the site I want to use only 3 framesets. One with left hand margin, one with right hand margin and one with both. The homepage always has both margins. So if I click a link for "sport" from the homepage, I want the sport page to appear in the main frame of the frameset with no left margin, how do i do this?
Apologies at the clumbsy use of english but i don't know the correct terminology!
Example, set up three dynamic framesets with the different formats you need:
frame-both-margins.htm
frame-noleft-margin.htm
frame-noright-margin.htm
Your sport.htm link is on the homepage, you want it to open in the frameset with no left margin.
The link would read, depending on the sets frame names:
frame-noleft-margin.htm?main=sport.htm
And, depending on how you right your initial frameset you can make all of the frames within it dynamic.
Assume your frame-noleft-margin.htm includes a "header" frame, right-hand "menu" frame and a "main" content frame. You can use a link that will right the frameset on the fly that will put whatever pages you want into each of these frames. Example:
frame-noleft-margin.htm?header=sport-header.htm&menu=sport-menu.htm&main=sport.htm
It can be a bit daunting fiddling with the javascript, especially with the Netscape DevEdge version, but if you take your time so you know what each line of the code is doing you can tweak it to get exaclty what you want.