Make my submenus appear above Form/Flash/Applet Objects

Top  Previous  Next

My submenus appear behind Form elements  (combo boxes, radio buttons etc.)

Is there something I can do about that?

 

Prior to version 4.1 of AllWebMenus you had to add special functions at the <Javascript Command> of your submenu groups in order for these submenus to appear above form elements. The functions used for that purpose were the awmhidediv(); and awmshowdiv(); ones.

 

Since version 4.2.632 AllWebMenus contains special code that solves the problem of Form objects appearing above submenus without the need for you to add these extra functions on your submenus. While this code automatically solves the problem in all non-IE browsers, IE requires that you check an option at the "Project Properties -> Optimization" form in order for the solution to work specifically for the IE browser. Click on the above link for more information on this option.

 

Therefore, all you have to do is check the above option and re-compile your menus so that form objects do not bother your menus again! The awmhidediv(); and awmshowdiv(); functions are now deprecated, but they are still functional for backwards compatibility reasons and for Java applet cases (see below). You may remove these functions from your menus if you wish.

 

 

How about Flash Objects?

 

Flash objects are considered to be "windows" on top of the browser and this is why they cover the submenus by default. This can be easily changed however. The solution is to add a transparent parameter on two locations inside your Flash object definition, as shown on the example below:

 

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="533" height="59">

<param name="WMode" value="Transparent">

   <param name="movie" value="banner_banamex.swf">

   <param name="quality" value="high">

   <embed src="banner_banamex.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="533" height="59" wmode="transparent"></embed>

</object>

 

By adding the transparent parameter on both locations the submenus will always appear above Flash objects on all browsers.

 

As with Form objects, the old awmhidediv(); and awmshowdiv(); functions are no longer required for hiding Flash objects so you may as well remove them from your existing implementations (if used).

 

 

How about Java applets?

 

Java applets appear as windows on top of the browser. Internet Explorer shows menus above java applets, but this is not happening on non-IE browsers. For this reason, you need to use the awmhidediv() and awmshowdiv() commands on the <Javascript Command on Appear> and <Javascript Command on Disappear> properties of the appropriate submenus. You need to make some additions inside your HTML for this solution to work.

 

The solution has the following steps:

 

Step 1 - Editing the HTML page:

 

- Open your web page in an html editor.

 

- Insert the id="awmflash1" parameter in the <applet> tag. For example:

 

<APPLET code="Bubbles.class" id="awmflash1" width="500" height="500">

Java applet that draws animated bubbles.

</APPLET>

 

If you have more than one applet to hide, then you should use the following strict order for their IDs:

id="awmflash1"

id="awmflash2"

id="awmflash3"

...etc., always starting from "1", in ascending order and without any gaps.

 

Step 2 - Editing the .awm file:

 

- Open your .awm menu in AllWebMenus

 

- Select the submenus that get covered by the applet. Only 1st level submenus need to be selected (submenus of Main Menu items)

 

- Enter the following value in their <Javascript Command on Appear> property:

awmhidediv();

 

- Enter the following value in its <Javascript Command on Disappear> property:

awmshowdiv();

 

This solution makes the applet disappear when the submenu appears, and vice versa, so that the correct element is always on top. It is obvious that you first need to identify which submenu or submenus conflict with the applet, so that you can use the proper values in the respective Javascript Commands. Apparently, the solution works best when the menu is static, i.e. the <Menu Drifts on Scroll> property is set to "No".