Back to Programming Articles

Tutorial: How to get the most out of your vB3 Popup Menus
by Natch 29 Jan 2004

There's two elements to having a popup-menu in vB3 ...
(the first examples are from my Flash Player addon - see working site example @ http://www.mobileforces.org)

1) the entry on the (navbar) template where you want it to popup
PHP Code:
<td id="flashplayer" class="vbmenu_control"><a href="#flashplayer">$vbphrase[flash_addon_title]</a> <script type="text/javascript"vbmenu_register("flashplayer"); </script></td
2) the actual menu
PHP Code:
<div class="vbmenu_popup" id="flashplayer_menu" style="display:none">
all your <tabletr and td stuff goes here ...]
</
div
In the (navbar) template where you specify the Link name, you must specify a unique label for the <td id="a_unique_label" ... for example if your label was "somelabel", the item on the navbar would be as follows:

PHP Code:
<td id="somelabel" class="vbmenu_control"><a href="#somelabel">Some Label</a> <script type="text/javascript"vbmenu_register("somelabel"); </script></td
and the menu must then be as follows:

PHP Code:
<div class="vbmenu_popup" id="somelabel_menu" style="display:none"
 [ 
all your <tabletr and td stuff goes here ...]
</
div
If you want there to be two menus with the identical contents, in different places on the same page, then you will need to make two menus with unique "somelabel" entries in both positions ...

Please let me know if I can make this clearer

vblts.ru supports vBulletin®, 2022-2024