Link to home
Start Free TrialLog in
Avatar of oddbod
oddbod

asked on

Question about frames

Why is it people keep saying try to avoid frames?  Is it because the URL link does not always change with frame sets?

Is it possible to have tables in that case where if a link is click from a navigation bar in the left of the table, only the content of the right hand side of the table changes according to what link is clicked?

i.e. the left navigation bar, top banners and bottom content remain static throughout the whole site?

Any example sites would be great to help explain your answer.

Pls post as comment.
ASKER CERTIFIED SOLUTION
Avatar of Hooligan
Hooligan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Hooligan
Hooligan

This also prevents folks from bookmarking certain pages, as only the main is bookmarked.

that should be under the first paragraph, not the second.  Like i said...tired <g>
Avatar of oddbod

ASKER

Ok, point taken.  Much what I expected.
What about links that only change the right hand side of the table content?
Seems to me that there are ways of using DHTML (i.e., <layer>s, <iframe>s) which are being used to accomplish what you are looking for.

It is also the case that, as the browsers continue to develop and the document object models are refined and adopted, it will become easier to change the content of individual areas/elements on any page.

Unfortunately, right now, this can be quite complicated, since the IE object model seems to allow access to elements which are not accessible to the NS model.  This increases the complexity of creating x-browser pages.

It is also the case that earlier versions of both (major) browsers do not support much of this functionality.

I suspect that is why some people prefer to use frames.

Tom
sure, you can link the right hand page from a left hand menu.  in your frameset you need to name each frame, as in

for main frame:
<frame name = 'fMain' src = 'blah.html'>

for menu frame:
<frame name = 'fMenu' src = 'menu.html'>

then when you have a link that you want to appear in the main frame, simply asign it as the target:

(from menu frame)
<a href = 'myPage.htm' target = 'main'>blah</a>

BTW the frame names can be just about anything, but I would avoid naming them the same as any htm documents.  You also cant name them standardized targets like top.  that willl open link in new window (o:
Avatar of oddbod

ASKER

I thought if you have tables, then you dont have framesets?
Tables and frames are not mutually exclusive.  As I indicated above, the problem with using tables for a navigational layout is the complexity of ensuring cross browser compatibility.  The document object models are different, and the code will be quite complex.

Tom
TTom's right regarding changing content in only parts of the document.  Currently it's cumbersome to do due to restrictions in object models.

There are many documents written regarding why frames are bad, two I sometimes refer to is Jakob Nielsens "Why frames suck (most of the time)" and HTMLHelp's "What's wrong with frames".  http://www.useit.com/alertbox/9612.html and http://www.htmlhelp.com/design/frames/whatswrong.html respectively.

There's probably also a million Usenet posts to be found on the same subject (both pros & cons).

I believe there's hope for the future though.  In the Cascading Style Sheets level 2 specification there's something called "Fixed positioning", which is frames with frames (so to speak).  That way you should be able to get a one-to-one relationship between a URL and a "frameset", and even though you will get some delay and redrawing of content when the document changes, you'll get close to what frames do now.
my apologies, i misread the question.  The question I answered the second time was how to target a different frame, not change cell content <g>

YTou can, with javascript, change the contets of a textbox, or an image. But otherwise, like everyoine else said, its not easy
my apologies, i misread the question.  The question I answered the second time was how to target a different frame, not change cell content <g>

YTou can, with javascript, change the contets of a textbox, or an image. But otherwise, like everyoine else said, its not easy
Most of the reasons why people dont want to use tables have been mentioned like, different resolutions,browsers that dont support frames,the url dont change, and the bookmark issue. Another very important thing that people tend to forget is search engine optimization which tend to cause some problems if you use frames. About your questions if u can change the text in a table if u click elsewhere in the table. The answer is yes that is possible to do with dhtml one way is to simply hide and display the content using an id to identify what the user clicks msdn.microsoft.com/workshop has a very good reference library which you can use to figure out how to do the trick.


hope it helps
Avatar of oddbod

ASKER

Thanks for that,  I just want to keep the question open until I can grade the best response.
When frames first appeared, boy did they appear. Some web sites could be found that opened up multitudes of frames for no good reason. That largly led to the I Hate Frames campaign. The reality is that most Internet users don't give a damn and wouldn't know what a frameset is.

However where they are a boon is on more complex sites. You tend to see these on Intranets more than on the Internet. On such sites being only able to book mark the frameset is a distinct advantage as and it might be argued that if it were valid to bookmark a frameset in a state other than when it is first loaded the frames shouldn't have been needed.

I would suggest that if you sites NEEDs to modify parts of tables then either you have a design flaw or you should use frames. Certainly the use of frames is going to be more reliable that DHTML etc.

I have to confess I have never heard of a search engine having problems with frames but I have to say that it isn't up to much if it does because from the spidering point of view its just a set of paths that have to be traversed.
Steve:

I think the issue with search engines is that they do not traverse the individual documents in a frameset.  Ergo, unless the links are specifically coded into the <noframes> section of the frameset doc, they will not be hit.

I must admit, however, that I am not absolutely sure of that.

Tom
Tom

Yes I thought that was what was being refered to and as I've said it ain't much of a spider if this causes a problem because each frame will appear as 'link' within the frameset and if it can't handle this then how does it deal with multiple links in a page because logically it is the same thing.

Steve
Steve:

FWIW, I suspect the spiders look for <a href> tags.  It would probably cause a hell of a mess if they had to determine whether ANY reference to http: or www. was supposed to constitute a link to be explored.

In any case, that's the way I THINK they work, so I guess we need to just allow for that.  I'm not sure it's much of a problem to include appropriate text in a <NOFRAMES> section.  In addition to giving the engine some lnks to follow, that would also allow the engine to calculate its appropriate "relevancy" ratio (i.e., content to keywords).  Probably not a bad idea.

Just my .02 pts,

Tom