Keep a Main Menu item highlighted when visiting a page
Top  Previous  Next


You can keep a Main Menu item highlighted when visiting a web page by using the following code inside your page:

<script>awmSelectedItem=x</script>

where x is the order of the Main Menu item you wish to be shown as selected.

By doing so, the selected item will be displayed with its [Mouse Click] state instead of its [Normal] state.


Example:
Let's assume you have the following menu and you want the "Downloads" item to be highlighted when you visit the downloads.html page:
clip0005


Since the "Downloads" item is the 2nd item in the Main Menu, you just need to put the following code somewhere inside your downloads.html page:

<script>awmSelectedItem=2</script>

When you now visit the downloads.html page, all Main Menu items will be displayed at their [Normal] state except of the "Downloads" item which will be displayed at its [Mouse Click] state.


Notes:
- This feature applies only for the Main Menu items. You cannot use this feature to have a submenu item highlighted.

- The [Mouse Over] state will be displayed instead of the [Mouse Click] state if you have the "Ignore Mouse Click State" box checked inside the Tools->Compile Properties->Optimization tab.




Special note for
multiple menus only:
If you have more than one menu in the same page, then you need to use the <script>awmSelectedItem=x</script> just before thmenu-linking sectione of all menus:

where,
x = the number of the selected item for the menu you want to have the highlighted option and
x = 0 for the rest of the menus.

Example of highlighting the 2nd item of menu2.js only:

<script>awmSelectedItem=0</script>
<!-- ******** BEGIN AllWebMenus CODE FOR menu1 ******** -->
<img name='awmMenuPathImg-menu1' id='awmMenuPathImg-menu1' src='awmmenupath.gif' alt=''>
<script type='text/javascript'>var MenuLinkedBy='AllWebMenus [2]', awmBN='482'; awmAltUrl='';</script>
<script src='menu1.js' language='JavaScript1.2' type='text/javascript'></script>
<script type='text/javascript'>awmBuildMenu();</script>
<!-- ******** END AllWebMenus CODE FOR menu1 ******** -->

<script>awmSelectedItem=2</script>
<!-- ******** BEGIN AllWebMenus CODE FOR menu2 ******** -->
<img name='awmMenuPathImg-menu2' id='awmMenuPathImg-menu2' src='awmmenupath.gif' alt=''>
<script type='text/javascript'>var MenuLinkedBy='AllWebMenus [2]', awmBN='482'; awmAltUrl='';</script>
<script src='menu2.js' language='JavaScript1.2' type='text/javascript'></script>
<script type='text/javascript'>awmBuildMenu();</script>
<!-- ******** END AllWebMenus CODE FOR menu2 ******** -->

<script>awmSelectedItem=0</script>
<!-- ******** BEGIN AllWebMenus CODE FOR menu3 ******** -->
<img name='awmMenuPathImg-menu3' id='awmMenuPathImg-menu3' src='awmmenupath.gif' alt=''>
<script type='text/javascript'>var MenuLinkedBy='AllWebMenus [2]', awmBN='482'; awmAltUrl='';</script>
<script src='menu3.js' language='JavaScript1.2' type='text/javascript'></script>
<script type='text/javascript'>awmBuildMenu();</script>
<!-- ******** END AllWebMenus CODE FOR menu3 ******** -->




Frame Show is the ideal software for desktop enhancement, desktop wallpaper and digital photo frame solutions.

Frame Show: Frame images, pictures, photos with the most innovative framing software!