Frequently asked questions

 
 
Question 1: In a framesetup the menu, the sublevels or the linked document don't show up where I want them
Probably the names of the frames and the variables FirstLineFrame, SecLineFrame and DocTargetFrame don't match
 
Example three frames setup:
frameset
<html>
  <frameset rows='20%,*'>
    <frame name='TopFrame' src='top.htm'></frame>
    <frameset cols='20%,*'>
      <frame name='MenuFrame' src='menu.htm'></frame>
      <frame name='TargetFrame' src='main.htm'></frame>
    </frameset>
  </frameset>
</html>

 
Relevant variables in exmplmenu_var.js
var FirstLineHorizontal=0;
var MenuFramesVertical=0;
var FirstLineFrame='MenuFrame';
var SecLineFrame='TargetFrame';
var DocTargetFrame='TargetFrame';
TopFrame
MenuFrame TargetFrame
Don't use names as top, new, blank, parent.

Question 2: In a framesetup, when a new document is loaded in the target frame the menu does not show again.
Only for versions older then version 7
 
When the target frame is the same frame as the frame where the sub items of the menu show every document loaded into the target frame must have the onload statement in the body tag.
<body onload="if(parent.frames[0]&&parent.frames['MenuFrame'].Go)parent.frames['MenuFrame'].Go();">
where 'MenuFrame' is the name of the frame where the first level items of the menu show up.
 
When that is not possible, for instance when the loaded page is 'foreign', the menu will not restart since the browser will not allow it to write elements into a document loaded from another domain. In that case you can open the document as top document:
Menu1=new Array("News","javascript:top.document.location.href='http://www.cnn.com'",.......
Or open a new window for that link. see question 3
 
The html syntax for a normal link on the page to open in the top document is:
<a target='_parent' href='...............

Question 3: How can I open a new window with a link in the menu.
Instead of:
Menu1=new Array("news","http://www.cnn.com",.......
use:
Menu1=new Array("news","javascript:NewWin=window.open('http://www.cnn.com','NWin');window['NewWin'].focus()",.....
 
The html syntax for a normal link on the page to open in a new window is:
<a target='_blank' href='...............

Question 4: How do I use images in the menu.?
Use HTML in the link text:
Menu1=new Array("<img src='MyImage.jpg'>","MyLink.htm",.......
You can use all normal HTML tags in the link text:
Menu1=new Array("<table width='100%' bgcolor='yellow'><tr><td class='MyClass>........</table>","MyLink.htm",.....
 

Question 5: Can the menu be right to left orientated.?
Version 4 supports right to left orientation. Set RightToLeft to 1

Question 6: The menu does not support Opera.
The menu cannot support Opera since Opera does not support the dynamic creation of elements.

Question 7: Is it possible to give the elements different dimensions on one level.?
It is possible with version 4.1. Version 4.1 is still beta, but you can get a copy when you email me.

Question 8: Why do the menu items drop behind some HTML elements.?
Some elements, like some form elements, and objects like Flash are outside the z-order of the document.  They are always on top. This is browser behavior and cannot be changed.  One way to work around that is to temporarely hide the element in question when the menu drops.
1- Put the form(s), element(s) or object(s) inside a named div:
<div id='HideDiv1' style="position:relative;"> element(s) </div>
2- Make an array in the document with the elements
<script type='text/javascript'>
   var HideArray=['HideDiv1','HideDiv2',...............];
</script>
<body>
3- Replace the empty functions BeforeFirstOpen and AfterCloseAll (Found in the variable file) with:
function BeforeFirstOpen(){
   if(ScLoc.HideArray){
      var H_A,H_Al,H_El,i;
      H_A=ScLoc.HideArray;
      H_Al=H_A.length;
      for (i=0;i<H_Al;i++){
         H_El=ScLoc.document.getElementById(H_A[i]).style;
         H_El.visibility=M_Hide}}}
 
function AfterCloseAll(){
   if(ScLoc.HideArray){
      var H_A,H_Al,H_El,i;
      H_A=ScLoc.HideArray;
      H_Al=H_A.length;
      for (i=0;i<H_Al;i++){
         H_El=ScLoc.document.getElementById(H_A[i]).style;
         H_El.visibility=M_Show}}}

Question 9: Can the menu be used in nested frames.?
Yes, as many as you like as long as the names of the frames and the variables FirstLineFrame, SecLineFrame and DocTargetFrame are set correctly.
However, it is best to define all frame in one document. The menu can be used in frame setups where some of the framesets are defined in a framedocument,  but dropping the submenus in a frameset defined in a document loaded into a frame is tricky and requires some understanding of the menu script and scripting in general.

Question 10: Can I have two menus on the same page.?
Not with Menu. You can with PopMenu, but PopMenu does not work accross frames.

Question 11: The arrows don't show up.
Make sure the arrows are in the same directory (folder) as the HTML document that holds the menu.