problem adding menu to column frameset

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joseph Scoccimaro

    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.getEle mentsByTagName( 'body')[0];

    //this inserts our menu as the first element in the body
    theBody.insertB efore(menuDiv, theBody.childNo des[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


  • Thomas 'PointedEars' Lahn

    #2
    Re: problem adding menu to column frameset

    Joseph Scoccimaro wrote:
    [color=blue]
    > Currently I am able to add my menu to a frameset that just uses rows with
    > this code:
    > if (window == top) {[/color]

    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.
    [color=blue]
    > //this obtains the body tag element of the document
    > var theBody = document.getEle mentsByTagName( 'body')[0];[/color]

    Ever heard of the `body' attribute of the HTMLDocument interface, being
    defined in W3C DOM Level 2 HTML and downwards compatible to IE4?
    [color=blue]
    > //this inserts our menu as the first element in the body
    > theBody.insertB efore(menuDiv, theBody.childNo des[0]);
    >
    >
    > }
    >
    > However if a frameset uses columns then this code does not add
    > my menu to any of the frames.[/color]

    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.or g/>
    <URL:http://diveintomark.or g/archives/2003/05/05/why_we_wont_hel p_you>
    [color=blue]
    > [...]
    > Could someone help me figure out how to add my menu to a page that uses
    > columns.[/color]

    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

    Comment

    Working...