468,765 Members | 1,231 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

problem adding menu to column frameset

Currently I am able to add my menu to a frameset that just uses rows with
this code:
if (window == top) {

//this obtains the body tag element of the document
var theBody = document.getElementsByTagName('body')[0];

//this inserts our menu as the first element in the body
theBody.insertBefore(menuDiv, theBody.childNodes[0]);
}

However if a frameset uses columns then this code does not add my menu to
any of the frames. I have looked on google for help but can't find any.
Could someone help me figure out how to add my menu to a page that uses
columns.

Joseph Scoccimaro
Dec 9 '05 #1
1 1222
Joseph Scoccimaro wrote:
Currently I am able to add my menu to a frameset that just uses rows with
this code:
if (window == top) {
So the following block is executed if, and only if, there is either
no frameset at all, or the code is located in the top frameset document.

If the former, I fail to see any problem.

If the latter, the `body' element can only be child of the `noframes'
element in which case it would only be displayed if frames were not
supported.
//this obtains the body tag element of the document
var theBody = document.getElementsByTagName('body')[0];
Ever heard of the `body' attribute of the HTMLDocument interface, being
defined in W3C DOM Level 2 HTML and downwards compatible to IE4?
//this inserts our menu as the first element in the body
theBody.insertBefore(menuDiv, theBody.childNodes[0]);
}

However if a frameset uses columns then this code does not add
my menu to any of the frames.
You are not making any sense. Perhaps you use a weird definition
of "frameset" different from that in the HTML 4.01 Specification.

<URL:http://jibbering.com/faq/#FAQ4_43>
<URL:http://validator.w3.org/>
<URL:http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you>
[...]
Could someone help me figure out how to add my menu to a page that uses
columns.


Do not use frames if you use them now. Neither are they required for
a navigational menu, nor is client-side scripting required for that.
PointedEars
Dec 9 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by lindsey.crocker | last post: by
5 posts views Thread by Martin Chen | last post: by
10 posts views Thread by Richard Lionheart | last post: by
13 posts views Thread by Giggle Girl | last post: by
4 posts views Thread by adamalton | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.