Results 1 to 8 of 8

Thread: dropdown menu

  1. #1
    Join Date
    Sep 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default dropdown menu

    Hi...I just took over a job (voluntarily) to maintaince a website for a non profit organisation. Was asked to add an extra dropdown menu to an existing one.

    M able to figure out the problem (need to edit the mm_menu.js) but I don't know where about. Can anyone help?

    Thanks.

    Loh

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Can you share the code of mm_menu.js? I don't think nobody won't be able to help you without that

  3. #3
    Join Date
    Sep 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Here's the mm_menu.js file....

    Loh

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That looks like one of at least two files for a javascript menu. The one that we would need to see would be the config file:

    mm_menu_config.js

    or something, it really could be named almost anything. Also helpful to know is, as you say you want to drop off of an existing drop down, do you mean drop down another level or just add another item at the existing level? If you want to add another level, some menus of this sort can only go one or two levels deep.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Sep 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hmmm....I don't think I've another js file. Sorry....I took over a volunteer work (to maintain a website on behalf of a non profit organisation)

    Please visit this site www.itla-toylibraries.org

    Am thinking of adding a drop down menu between the "wpd" and "link".

    I managed to figure out that I need to create some gif files to use as a button, and realised that I need to do something to the mm_menu.js

    Loh

  6. #6
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Thumbs up

    Please following the steps furnished below to change your main menu/sub menus

    Please load your site's home page and right click just above of your header menus and select view source.

    Actually your home page contains two frames and loaded two pages ie TOP.HTM and main.htm

    TOP.HTM is the one that handles the header menu part. Please check the source code of the TOP.HTM file

    All the header menu items are image based ones. If you want to change those items then you need the new menu images.

    From TOP.HTM
    HTML Code:
    <td width="58" rowspan="2"><a href="#" onMouseOut="MM_startTimeout();" onMouseOver="MM_showMenu(window.mm_menu_0109002736_0,0,12,null,'top_r2_c2');"><img name="top_r2_c2" src="top_r2_c2.jpg" width="58" height="11" border="0" alt=""></a></td>
    The above is from your TOP.HTM page which is your about us header menu. top_r2_c2 is the header menu image

    If you want to change your submenus then please check the client-side Javascript furnished in the HEAD section of the page, for example the below mentioned code represent the submenus of your about us header menu

    FROM TOP.HTM

    Code:
    window.mm_menu_0109002736_0 = new Menu("root",123,16,"Verdana, Arial, Helvetica, sans-serif",10,"#999999","#333333","#ffffff","#ffffff","left","middle",3,0,30000,-5,7,true,true,true,0,true,true);
    mm_menu_0109002736_0.addMenuItem("presidents&nbsp;message","window.open('pm.htm', 'mainFrame');");
    mm_menu_0109002736_0.addMenuItem("who&nbsp;are&nbsp;we","window.open('au.htm', 'mainFrame');");
    mm_menu_0109002736_0.addMenuItem("our&nbsp;aims","window.open('ouraims.htm', 'mainFrame');");
    mm_menu_0109002736_0.addMenuItem("board&nbsp;members","window.open('bm.htm', 'mainFrame');");
    You can find other submenus that are associated to other header menus other than about us in the TOP.HTM

    Now I think you'll get the idea, whatever changes you want to make in the submenus can be done in the required section like the one i mentioned above.

    If you examine the code further

    Code:
    mm_menu_0109002736_0.addMenuItem("presidents&nbsp;message","window.open('pm.htm', 'mainFrame');");
    This is the first submenu item of about us header menu

    Code:
    "presidents&nbsp;message"
    is the submenu title which you want to display to the users

    Code:
    window.open('pm.htm', 'mainFrame')
    Whenever the user clicks on this submenu item then it will open a file named PM.HTM in the mainFrame used in the home page.

    Hope this will do the job, please let us know if there is any problem in there

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Yes, what codeexploiter said looks about right. By way of explanation - with these sorts of menus this:

    Code:
    <script language="JavaScript">
    <!--
    function mmLoadMenus() {
      if (window.mm_menu_0109002736_0) return;
      window.mm_menu_0109002736_0 = new Menu("root",123,16,"Verdana, Arial, Helvetica, sans-serif",10,"#999999","#333333","#ffffff","#ffffff","left","middle",3,0,30000,-5,7,true,true,true,0,true,true);
      mm_menu_0109002736_0.addMenuItem("presidents&nbsp;message","window.open('pm.htm', 'mainFrame');");
      mm_menu_0109002736_0.addMenuItem("who&nbsp;are&nbsp;we","window.open('au.htm', 'mainFrame');");
      mm_menu_0109002736_0.addMenuItem("our&nbsp;aims","window.open('ouraims.htm', 'mainFrame');");
      mm_menu_0109002736_0.addMenuItem("board&nbsp;members","window.open('bm.htm', 'mainFrame');");
       <!--mm_menu_0109002736_0.bgImageUp="mmmenu4_123x16_up.gif";
       <!--mm_menu_0109002736_0.bgImageOver="mmmenu4_123x16_over.gif";
       mm_menu_0109002736_0.fontWeight="bold";
       mm_menu_0109002736_0.hideOnMouseOut=true;
       mm_menu_0109002736_0.bgColor='#999999';
       window.mm_menu_0109002736_1 = new Menu("root",130,16,"Verdana, Arial, Helvetica, sans-serif",10,"#999999","#333333","#ffffff","#ffffff","left","middle",80,0,30000,-5,7,true,true,true,0,true,true);
      mm_menu_0109002736_1.addMenuItem("ITLA&nbsp;newsletter","window.open('newsletter.htm', 'mainFrame');");
      mm_menu_0109002736_1.addMenuItem("ITLA&nbsp;documentation&nbsp;center","window.open('dc.htm', 'mainFrame');");
      mm_menu_0109002736_1.addMenuItem("conference&nbsp;papers","window.open('conference.htm', 'mainFrame');");
      mm_menu_0109002736_1.addMenuItem("research&nbsp;papers","window.open('research.htm', 'mainFrame');");
       <!--mm_menu_0109002736_1.bgImageUp="mmmenu3_165x16_up.gif";
       <!--mm_menu_0109002736_1.bgImageOver="mmmenu3_165x16_over.gif";
       mm_menu_0109002736_1.fontWeight="bold";
       mm_menu_0109002736_1.hideOnMouseOut=true;
       mm_menu_0109002736_1.bgColor='#999999';
      window.mm_menu_0109002736_2 = new Menu("root",100,16,"Verdana, Arial, Helvetica, sans-serif",10,"#999999","#333333","#ffffff","#ffffff","left","middle",150,0,30000,-5,7,true,true,true,0,true,true);
      mm_menu_0109002736_2.addMenuItem("8th.&nbsp;international&nbsp;conference","window.open('8ic.htm', 'mainFrame');");
      mm_menu_0109002736_2.addMenuItem("9th.&nbsp;international&nbsp;conference","window.open('9ic.htm', 'mainFrame');");
       mm_menu_0109002736_2.addMenuItem("10th.&nbsp;international&nbsp;conference","window.open('10ic.htm', 'mainFrame');");
       mm_menu_0109002736_2.addMenuItem("related&nbsp;stories","window.open('rs.htm', 'mainFrame');");   
       <!--mm_menu_0109002736_2.bgImageUp="mmmenu2_175x16_up.gif";
       <!--mm_menu_0109002736_2.bgImageOver="mmmenu2_175x16_over.gif";
       mm_menu_0109002736_2.fontWeight="bold";
       mm_menu_0109002736_2.hideOnMouseOut=true;
       mm_menu_0109002736_2.bgColor='#999999';
      window.mm_menu_0109002736_3 = new Menu("root",137,16,"Verdana, Arial, Helvetica, sans-serif",10,"#999999","#333333","#ffffff","#ffffff","left","middle",230,0,30000,-5,7,true,true,true,0,true,true);
      mm_menu_0109002736_3.addMenuItem("world&nbsp;play&nbsp;day","window.open('wpd.htm', 'mainFrame');");
    mm_menu_0109002736_3.addMenuItem("telegram&nbsp;from&nbsp;Italy","window.open('mfip.htm', 'mainFrame');");
      <!--mm_menu_0109002736_3.bgImageUp="mmmenu1_137x16_up.gif";
       <!--mm_menu_0109002736_3.bgImageOver="mmmenu1_137x16_over.gif";
       mm_menu_0109002736_3.fontWeight="bold";
       mm_menu_0109002736_3.hideOnMouseOut=true;
       mm_menu_0109002736_3.bgColor='#999999';
         window.mm_menu_0109002736_4 = new Menu("root",137,16,"Verdana, Arial, Helvetica, sans-serif",10,"#999999","#333333","#ffffff","#ffffff","left","middle",230,0,30000,-5,7,true,true,true,0,true,true);
      mm_menu_0109002736_4.addMenuItem("link&nbsp;persons","window.open('lp.htm', 'mainFrame');");
      mm_menu_0109002736_4.addMenuItem("worldwide&nbsp;toy&nbsp;libraries","window.open('wwtl.htm', 'mainFrame');");
       <!--mm_menu_0109002736_4.bgImageUp="mmmenu1_137x16_up.gif";
       <!--mm_menu_0109002736_4.bgImageOver="mmmenu1_137x16_over.gif";
       mm_menu_0109002736_4.fontWeight="bold";
       mm_menu_0109002736_4.hideOnMouseOut=true;
       mm_menu_0109002736_4.bgColor='#999999';
        mm_menu_0109002736_4.writeMenus();
          } // mmLoadMenus()
    //-->
    </script>
    from your top.htm is usually what is in a separate external 'config' file. Nothing wrong with having it on the page though, especially in a frames setup.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Sep 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi...

    Thanks for the explanation...I can understand how it works now.
    But still having problems.....

    I know I need to have new menu images so I've created those files.

    In order to get an extra menu between "wpd" and "link", I used the code for "link" for "new menu" and added below codes in the HEAD session for "link". But this doesn't work.

    Code:
    window.mm_menu_0109002736_5 = new Menu("root",137,16,"Verdana, Arial, Helvetica, sans-serif",10,"#999999","#333333","#ffffff","#ffffff","left","middle",230,0,30000,-5,7,true,true,true,0,true,true);
      mm_menu_0109002736_5.addMenuItem("link&nbsp;persons","window.open('lp.htm', 'mainFrame');");
      mm_menu_0109002736_5.addMenuItem("worldwide&nbsp;toy&nbsp;libraries","window.open('wwtl.htm', 'mainFrame');");
       <!--mm_menu_0109002736_5.bgImageUp="mmmenu1_137x16_up.gif";
       <!--mm_menu_0109002736_5.bgImageOver="mmmenu1_137x16_over.gif";
       mm_menu_0109002736_5.fontWeight="bold";
       mm_menu_0109002736_5.hideOnMouseOut=true;
       mm_menu_0109002736_5.bgColor='#999999';
        mm_menu_0109002736_5.writeMenus();
    So how can I make this work?

    Loh

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
  •