Results 1 to 5 of 5

Thread: All Levels Navigational Menu

  1. #1
    Join Date
    Mar 2009
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default All Levels Navigational Menu

    1) Script Title: All Levels Navigational Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...menu/index.htm

    3) Describe problem: Question on this menu. It states that you add the HTML for the drop down menus to the body tag. That would mean for every single page of a site, correct? There isn't a way to add it to a header include file, so that it would work on all pages that include that header?

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,380
    Thanks
    31
    Thanked 148 Times in 142 Posts
    Blog Entries
    34

    Default

    You could use Ajax to include the HTML, or you could put the HTML in a file called menu.html, and then put the following lines in an external js-file, say include.js, which would contain the following lines:
    Code:
    if(window.opera)
    {document.write('<iframe src="menu.html" width="0" height="0" name="menu" ></iframe>');}
    else document.write('<object type="text/html" data="menu.html" width="0" height="0" name="menu" ></object>');
    function extractMenu(){
    try{
    document.body.innerHTML+=window.frames['menu'].body.innerHTML;
    }
    catch(e){
    document.body.innerHTML+=window.frames['menu'].document.body.innerHTML;
    }
    }
    window.onload=extractMenu;
    and which is included on every page by putting this in the head of the pages:
    <script type="text/javascript" src="include.js"></script> (the styles and css for the menu (written in menu.html) must also be put in the head of every page (not in menu.html).

    Or: try this.
    ===
    Arie.

  3. #3
    Join Date
    Mar 2009
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation help

    If I place this code in an include file:

    [code]<div id="ddtopmenubar" class="mattblackmenu">


    <ul>
    <li><a href="../personal/index_new.asp" rel="ddsubmenu1">PERSONAL</a></li>
    <li><a href="../business/index.asp" rel="ddsubmenu2">BUSINESS</a></li>
    <li><a href="../investor/index.asp" rel="ddsubmenu3">INVESTOR</a></li>
    <li><a href="../about/index.asp" rel="ddsubmenu4">ABOUT US</a></li>
    </ul>
    </div>

    <script type="text/javascript">
    ddlevelsmenu.setup("ddtopmenubar", "topbar") //ddlevelsmenu.setup("mainmenuid", "topbar")
    </script>[code]


    And this file is called after the body tag in an asp page: <!-- #include virtual="/includes/section_index_head3.inc" -->


    Because it is after the <body> tag in the page, can I also include the rest of the html for the menu in this file, or does it need to be separate?

    I got the menu to appear - with the top level links that work - but the drop-down functinoality does not work. No arrows, no drop-down - nothing.

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,380
    Thanks
    31
    Thanked 148 Times in 142 Posts
    Blog Entries
    34

    Default

    I don't know how it works in asp page. I only tested it in html-pages, like here.
    ===
    Arie.

  5. #5
    Join Date
    Mar 2009
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry not working

    I have tried the smooth navigational menu and now the all levels navigational menu -

    The main top level menu looks and works great - however, I can't get the arrows or drop-downs to appear at all. Very frustrating.

    I can't post my entire code on here. All I can say is that I have an include file (header) that's called within the body of all of my pages and for whatever reason, as I said above, the arrow and sub-menus do not work. Would it be that the .js file is just not being called at all?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •