Results 1 to 4 of 4

Thread: HV Menu problem

  1. #1
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default HV Menu problem

    I am using:-
    Hvmenu "Ger Versluis 2000 version 8.2 24 April 2002"
    Windows media centre edition SP2.
    IE7 7.0.5730.13

    Problem:-
    If I have a link to an external website (or external program e.g. excel) it only works properly if I open it in a new window. If I open it in an existing frame, the menus freeze up, and sometimes dissappear completely. In the example below, "Link new window" menu will work fine. However, "Link existing window" will only work once. After selection the menus freeze up.

    Frames.htm
    Code:
    <HTML>
    <HEAD>
    <TITLE>Frames</title>
    </HEAD>
    <FRAMESET border=NO frameSpacing=0 rows=50,* frameBorder=0 SCROLLING="NO">
      <FRAME name=title marginWidth=0 marginHeight=10 src="title.htm" scrolling="no" noresize>
      <FRAMESET border=NO frameSpacing=0 rows=*,0 frameBorder=0 SCROLLING="NO">
        <FRAMESET cols="201,*">
          <FRAME name=menu marginWidth=15 marginHeight=30 src="menu.htm" scrolling="auto" noresize>
            <FRAME name=main marginWidth=20 marginHeight=20 src="main.htm" scrolling="auto" noresize>
        </FRAMESET>
      </FRAMESET>
    </FRAMESET>
    </HTML>
    Title.htm
    Code:
    <html>
    <head>
    <meta http-equiv="Page-Enter" content="revealTrans(Duration=1.0,Transition=15)">
    </head>
    <body bgcolor="#009900" text="#FFFFFF">
    </body>
    </html>
    Menu.htm
    Code:
    <html>
    <head>
    <style type="text/css">
    	BODY {background-color:006699}
    </style>
    </head>
    <body>
    <script type='text/javascript'>function Go(){return}</script> 
    <script type='text/javascript' src='menu_var.js'></script> 
    <script type='text/javascript' src='menu.js'></script>
    </body>
    </html>
    Main.htm
    Code:
    <html>
    <head>
    <title>HVMENU PROBLEM</title>
    <style type="text/css">
    A:link { color: "#AA0000" }
    A:visited { color: "#AA0000" }
    A:active { color: "#AA0000" }
    A:hover { color: "#0000FF" }
    </style>
    </head>
    <body
    <center>
    </center>
    </body>
    </html>
    Cutdown version of menu_var.js that still shows problem

    Code:
    /******************************************************
    *    (c) Ger Versluis 2000 version 8.2 24 April 2002  *
    *    You may use this script on non commercial sites. *
    *    For info write to menus@burmees.nl               *
    *    You may remove all comments for faster loading   *        
    *******************************************************/
    var DistFrmFrameBrdr = 0;
    var NoOffFirstLineMenus = 1;      // Number of main menu items
                                      // Colorvariables:
                                      // Color variables take HTML predefined color names or "#rrggbb" strings
                                      // For transparency make colors and border color ""
    var LowBgColor = "#006699";       // Background color when mouse is not over
    var HighBgColor = "#006699";      // Background color when mouse is over
    var FontLowColor = "#aa0000";     // Font color when mouse is not over
    var FontHighColor = "#ffff00";    // Font color when mouse is over
    var BorderColor = "#006699";      // Border color
    var BorderWidth = 1;              // Border width
    var BorderBtwnElmnts = 1;         // Border between elements 1 or 0
    var FontFamily = "Comic sans MS"  // Font family menu items
    var FontSize = 10;                // Font size menu items
    var FontBold = 1;                 // Bold menu items 1 or 0
    var FontItalic = 1;               // Italic menu items 1 or 0
    var MenuTextCentered = "left";    // Item text position left, center or right
    var MenuCentered = "left";        // Menu horizontal position can be: left, center, right, justify,
                                      //  leftjustify, centerjustify or rightjustify. PartOfWindow determines part of window to use
    var MenuVerticalCentered = "top"; // Menu vertical position top, middle,bottom or static
    var ChildOverlap = 0;             // horizontal overlap child/ parent
    var ChildVerticalOverlap = .2;    // vertical overlap child/ parent
    var StartTop = 20;                // Menu offset x coordinate
    var StartLeft = 0;                // Menu offset y coordinate
    var VerCorrect = 0;               // Multiple frames y correction
    var HorCorrect = 0;               // Multiple frames x correction
    var LeftPaddng = 3;               // Left padding
    var TopPaddng = 1;                // Top padding
    var FirstLineHorizontal = 1;      // First level items layout horizontal 1 or 0
    var MenuFramesVertical = 1;       // Frames in cols or rows 1 or 0
    var DissapearDelay = 1000;        // delay before menu folds in
    var UnfoldDelay = 100;            // delay before sub unfolds    
    var TakeOverBgColor = 1;          // Menu frame takes over background color subitem frame
    var FirstLineFrame = "menu";      // Frame where first level appears
    var SecLineFrame = "main";        // Frame where sub levels appear
    var DocTargetFrame = "main";      // Frame where target documents appear
    var TargetLoc = "";               // span id for relative positioning
    var MenuWrap = 1;                 // enables/ disables menu wrap 1 or 0
    var RightToLeft = 0;              // enables/ disables right to left unfold 1 or 0
    var BottomUp = 0;                 // enables/ disables Bottom up unfold 1 or 0
    var UnfoldsOnClick = 0;           // Level 1 unfolds onclick/ onmouseover
    var BaseHref = "";                // BaseHref lets you specify the root directory for relative links. 
                                
    var Arrws = [BaseHref + "",15,15,BaseHref + "",15,15,BaseHref + "",15,15,BaseHref + "",15,15];
    
    var MenuUsesFrames = 1;           // MenuUsesFrames is only 0 when Main menu, submenus,
                                      // document targets and script are in the same frame.
                                      // In all other cases it must be 1
    
    var RememberStatus = 0;                
    
    var PartOfWindow = .8;                
    
    var MenuSlide = "";
    var MenuSlide = "progid:DXImageTransform.Microsoft.RevealTrans(duration=.9, transition=19)";
    var MenuSlide = "progid:DXImageTransform.Microsoft.GradientWipe(duration=.5, wipeStyle=1)";
    
    var MenuShadow = "";
    var MenuShadow = "progid:DXImageTransform.Microsoft.DropShadow(color=#003399, offX=2, offY=2, positive=1)";
    var MenuShadow = "progid:DXImageTransform.Microsoft.Shadow(color=#003399, direction=135, strength=3)";
    
    var MenuOpacity = "";
    var MenuOpacity = "progid:DXImageTransform.Microsoft.Alpha(opacity=100)";
    
    function BeforeStart(){return}
    function AfterBuild(){return}
    function BeforeFirstOpen(){return}
    function AfterCloseAll(){return}
    
    // Menu tree:
    // MenuX=new Array("ItemText","Link","background image",number of sub elements,height,width,"bgcolor","bghighcolor",
    //    "fontcolor","fonthighcolor","bordercolor","fontfamily",fontsize,fontbold,fontitalic,"textalign","statustext");
    // Color and font variables defined in the menu tree take precedence over the global variables
    // Fontsize, fontbold and fontitalic are ignored when set to -1.
    // For rollover images ItemText format is:  "rollover?"+BaseHref+"Image1.jpg?"+BaseHref+"Image2.jpg" 
    
        Menu1 = new Array("Links","","",2,20,200,"","","","","","",-1,-1,-1,"","Links");
        Menu1_1 = new Array("Link new window","javascript:NewWin=window.open('http://www.google.co.uk/','NWin');window['NewWin'].focus()","",0,20,200,"","","","","","",-1,-1,-1,"","Google");
        Menu1_2 = new Array("Link existing window","http://www.google.co.uk/","",0,20,200,"","","","","","",-1,-1,-1,"","Google");

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    The reason why the HV menu (frameset version) doesn't work anymore after you opened an external website in the main frame is that the menu needs information (given in the main frame pages) to function properly.

    I proposed a solution elsewhere, which allows you to use the no-frameset-version of the HV menu even in framesets (and to open external websites in whatever frame without problems), see here.

    Good luck,
    Arie Molendijk.

  3. #3
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the quick reply. I have had a go at doing it as you suggested. However, it doesn't quite work as I would like it to. The base menus do not sit below each other in the left frame. They actually sit to right of each other.

    Should be like:-

    Code:
    
    +----------------------------------------------+
    | top frame                                    |
    +----------------------------+-----------------+
    |     Left frame             |   Main frame    |
    | base1 +--- Sub menu 1      |                 |
    |       +--- Sub menu 2      |                 |
    |       +--- Sub menu n      |                 |
    | base2 +--- Sub menu 1      |                 |
    |       +--- Sub menu 2      |                 |
    |       +--- Sub menu n      |                 |
    +----------------------------+-----------------+
    
    But actually looks like:-

    Code:
    
    +------------------------------------------------+
    | top frame                                      |
    +------------------------------+-----------------+
    |     Left frame               |   Main frame    |
    | base1 +--- Sub menu 1        |                 |
    |       +--- Sub menu 2        |                 |
    |       +--- Sub menu n        |                 |      
    |       base2 +--- Sub menu 1  |                 |
    |             +--- Sub menu 2  |                 |
    |             +--- Sub menu n  |                 |
    +------------------------------+-----------------+
    
    I also have a question. You say that the HVmenu that I am using is not for frames. So why does the java script have the variables:-

    var FirstLineFrame = "menu"; // Frame where first level appears
    var SecLineFrame = "main"; // Frame where sub levels appear
    var DocTargetFrame = "main"; // Frame where target documents appear
    var MenuUsesFrames = 1; // MenuUsesFrames is only 0 when Main menu, submenus,
    // document targets and script are in the same frame.
    // In all other cases it must be 1

    This would suggest that it is designed to use frames wouldn't it?

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Gixxerman,
    The whole idea is that the menu should 'think' that there is no frameset.
    So replace this:
    Code:
    var FirstLineFrame = "menu"; // Frame where first level appears
    var SecLineFrame = "main"; // Frame where sub levels appear
    var DocTargetFrame = "main"; // Frame where target documents appear
    var MenuUsesFrames = 1; // MenuUsesFrames is only 0 when Main menu, submenus,
    with this:
    Code:
    var FirstLineFrame = ""; 
    var SecLineFrame = ""; 
    var DocTargetFrame = ""; 
    var MenuUsesFrames = 0;
    That should work, unless the names of the frames of the frameset are not right.
    Also, don't forget to put <base target="main"> in index.html.

    Hope this helps,
    Arie Molendijk

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
  •