Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking to a frameset + requesting a particular page in mainframe

Status
Not open for further replies.

ste123

MIS
May 5, 2003
4
0
0
GB
I am setting up a simple sitemap. I have pages that load into a frameset comprising a banner (for navigation) and a mainframe. How do I make the link on the sitemap cause the correct page to load in the mainframe of the frameset?
 
<a href=&quot;link&quot; target=&quot;mainframe name&quot;>

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
decee - I know that's how frames generally work, but I want the link on the sitemap to cause my frameset to load, and load a particular page (from the many that use that frameset) into the target &quot;mainframe&quot;
 
the easy way would be to make a frameset for each link (to much work). the harder part could be with javascript and i cannot help with that as i dont know much (or any) of javascript. maybe you could use a server language too like php

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
thanks deecee. I see this type of issue has been raised before and it looked like javascript might be the answer. In actual fact I am already using multiple framesets - one for each top level content area e.g. Home to Info launches an 'Info frameset', Home to Contacts launches a 'contact frameset'. This at least lets me control the default mainframe associated with each top level content area. I agree that a frameset to handle links from a non frameset page to a framset for every subpage would be too much work. It's a shame w3c haven't addressed this as it is probably a common problem. To tell you the truth I think frames are too much bother - especially when you have to do a noframes version of the site too!
Thanks for your help.
 
in all honesty frames are useless (period).

us includes for now as they are easy and dont really reuire much except for a server language or SSI. or you can use layers or iframes but browsers will have to be current for the most part.

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
> It's a shame w3c haven't addressed this

They have - by abolishing frames! Can't blame them really as frames were foisted upon them by Netscrape rather than being their own idea. Not being able to link to a particular combination of frame contents is one of the many crummy things abour them.

In the bad old days when I had a framed site, I worked around this problem by writing a cgi script that dynamically built the relevant frameset around a specified page. A table- or CSS-based layout is much easier to get along with.

-- Chris Hunt
Extra Connections Ltd
 
ste123,

You could pass the required &quot;mainframe&quot; in a query string in the link:

example:
<a href=&quot;myframe.htm?rf=requiredframe.htm&quot;>LINKNAME</a>

What some people do not seem to realize is that a framesset page at its simplest level is just a list of pages that you would like to display concurrently within the same browser window. If you want to display two or more pages concurrently use a frameset otherwise don't.

The noframe tag is not only optional but also virtually obsolete. If you wanted to account for the possibility that someone could not view a framset you might code:

<noframes><body><a href=&quot;navpage.htm&quot;>
Click here for a noframes version
</a></body></noframes>

However, a more creative use for the noframes tag is to provide a description of your site and keywords, which will be used by search engines, since most engines now ignore meta tags.

Finally frames have not been &quot;banned&quot; by WC3 as stated by ChrisHunt.

Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top