Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Dec 2002
    Location
    Boca Raton , Fl
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is there a way to add sub menus to this script and

    Is there a way to add sub menus to this script and also to have the popup window center and be on top (upper portion of screen).
    The script below is for the main page the next script has been uncompiled and had a name menu_array.js and the last script mmenu.js is in the attached zip and as far as I know this one is not normally changed

    Thanks

    Don Miller


    <head>

    <script language=javascript>
    function openNewWindow(winURL,winWidth,winHeight,winConfig){
    mmConfig=""
    mmConfig="width="+winWidth+","
    mmConfig+="height="+winHeight+","
    mmConfig+=winConfig
    var mmWin=open(winURL,"",mmConfig);
    mmWin.focus();
    }
    </script>



    MENU_ARRAY SCRIPT

    /*
    Milonic DHTML Menu
    Written by Andy Woolley
    Copyright 2002 (c) Milonic Solutions. All Rights Reserved.
    Plase vist http://www.milonic.co.uk/menu or e-mail menu3@milonic.com
    You may use this menu on your web site free of charge as long as you place prominent links to http://www.milonic.co.uk/menu and
    your inform us of your intentions with your URL AND ALL copyright notices remain in place in all files including your home page
    Comercial support contracts are available on request if you cannot comply with the above rules.

    Please note that major changes to this file have been made and is not compatible with earlier versions..

    You no longer need to number your menus as in previous versions.
    The new menu structure allows you to name the menu instead. This means that you can remove menus and not break the system.
    The structure should also be much easier to modify, add & remove menus and menu items.

    If you are having difficulty with the menu please read the FAQ at http://www.milonic.co.uk/menu/faq.php before contacting us.

    Please note that the above text CAN be erased if you wish as long as copyright notices remain in place.
    */

    //The following line is critical for menu operation, and MUST APPEAR ONLY ONCE.
    menunum=0;menus=new Array();_d=document;function addmenu(){menunum++;menus[menunum]=menu;}function dumpmenus(){mt="<script language=JavaScript>";for(a=1;a<menus.length;a++){mt+=" menu"+a+"=menus["+a+"];"}mt+="<\/script>";_d.write(mt)}
    //Please leave the above line intact. The above also needs to be enabled if it not already enabled unless you have more than one _array.js file


    ////////////////////////////////////
    // Editable properties START here //
    ////////////////////////////////////

    timegap=500 // The time delay for menus to remain visible
    followspeed=5 // Follow Scrolling speed
    followrate=50 // Follow Scrolling Rate
    suboffset_top=5 // Sub menu offset Top position
    suboffset_left=10 // Sub menu offset Left position



    GrayOrange=[ // GrayOrange is an array of properties. You can have as many property arrays as you need
    "000000", // Mouse Off Font Color
    "CCCCCC", // Mouse Off Background Color (use zero for transparent in Netscape 6)
    "000000", // Mouse On Font Color
    "ff9933", // Mouse On Background Color
    "666666", // Menu Border Color
    "12", // Font Size (default is px but you can specify mm, pt or a percentage)
    "normal", // Font Style (italic or normal)
    "normal", // Font Weight (bold or normal)
    "comic sans ms,verdana,helvetica",// Font Name
    3, // Menu Item Padding or spacing
    , // Sub Menu Image (Leave this blank if not needed)
    0, // 3D Border & Separator bar
    , // 3D High Color
    , // 3D Low Color
    , // Current Page Item Font Color (leave this blank to disable)
    , // Current Page Item Background Color (leave this blank to disable)
    , // Top Bar image (Leave this blank to disable)
    , // Menu Header Font Color (Leave blank if headers are not needed)
    , // Menu Header Background Color (Leave blank if headers are not needed)
    , // Menu Item Separator Color
    ]


    addmenu(menu=[
    "OpenWindows", // Menu Name - This is needed in order for this menu to be called
    160, // Menu Top - The Top position of this menu in pixels
    10, // Menu Left - The Left position of this menu in pixels
    140, // Menu Width - Menus width in pixels
    1, // Menu Border Width
    , // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
    GrayOrange, // Properties Array - this array is declared higher up as you can see above
    1, // Always Visible - allows this menu item to be visible at all time (1=on or 0=off)
    , // Alignment - sets this menu elements text alignment, values valid here are: left, right or center
    "Shadow(color=777777, Direction=135, Strength=5)",// Filter - Text variable for setting transitional effects on menu activation - see above for more info
    1, // Follow Scrolling Top Position - Tells this menu to follow the user down the screen on scroll placing the menu at the value specified.
    0, // Horizontal Menu - Tells this menu to display horizontaly instead of top to bottom style (1=on or 0=off)
    0, // Keep Alive - Keeps the menu visible until the user moves over another menu or clicks elsewhere on the page (1=on or 0=off)
    , // Position of TOP sub image left:center:right
    , // Set the Overall Width of Horizontal Menu to specified width or 100% and height to a specified amount
    0, // Right To Left - Used in Hebrew for example. (1=on or 0=off)
    0, // Open the Menus OnClick - leave blank for OnMouseover (1=on or 0=off)
    , // ID of the div you want to hide on MouseOver (useful for hiding form elements)
    , // Background image for menu Color must be set to transparent for this to work
    0, // Scrollable Menu
    , // Miscellaneous Menu Properties
    ,"Open New Frame","show-menu=NewFrame","#",,1
    ,"Open In IFrame","show-menu=NewIframe","#",,1
    ,"New Window","show-menu=NewWindow","#",,1
    ])


    addmenu(menu=[
    "NewFrame",
    ,
    ,
    130,
    1,
    ,
    GrayOrange,
    0,
    ,
    "Shadow(color=777777, Direction=135, Strength=5)",
    0,
    0,
    0,
    ,
    ,
    0,
    0,
    ,
    ,
    0,
    ,
    ,"Google in _BLANK","http://www.google.com target=_blank;",,,1
    ,"Google in _NEW","http://www.google.com target=_NEW;",,,1
    ])


    addmenu(menu=[
    "NewIframe",
    ,
    ,
    180,
    1,
    ,
    GrayOrange,
    0,
    ,
    "Shadow(color=777777, Direction=135, Strength=5)",
    0,
    0,
    0,
    ,
    ,
    0,
    0,
    ,
    ,
    0,
    ,
    ,"Open Google in IFrame","javascriptpenIFrame(\"tempiframe\",\"http://www.google.com\")",,,0
    ])


    addmenu(menu=[
    "NewWindow",
    ,
    ,
    130,
    1,
    ,
    GrayOrange,
    0,
    ,
    "Shadow(color=777777, Direction=135, Strength=5)",
    0,
    0,
    0,
    ,
    ,
    0,
    0,
    ,
    ,
    0,
    ,
    ,"Open Google in Small Window","javascriptpenNewWindow(\"http://www.google.com\",200,200,\"\")",,,1
    ,"open Google in Bigger Window","javascriptpenNewWindow(\"http://www.google.com\",600,400,\"\")",,,1
    ,"Open Google in Bigger Window with Properties","javascriptpenNewWindow(\"http://www.google.com\",600,400,\"status=yes,location=yes,resizable=yes\")",,,1
    ])




    dumpmenus();
    Attached Files Attached Files


 

Posting Permissions

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