problem adding menu to column frameset

  • Thread starter Joseph Scoccimaro
  • Start date
J

Joseph Scoccimaro

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
 
T

Thomas 'PointedEars' Lahn

Joseph said:
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/>
[...]
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,173
Latest member
GeraldReund
Top