Home

About

Online Samples

Download

Licensing

Support

Company

Contact


Cross Frame Popup Menus

[SmartMenus 6 add-on]

This sample demonstrates how you can create cross frame popup menus with SmartMenus 6.

For the purpose you have to first create some popup menus on the pages that will load in your main frame. And then you can call these popup menus from links in your navigation frame.

Setting up the pages in your main frame

The SmartMenus configuration (c_config.js) and script core (c_smartmenus.js) files should be linked on the pages that will load in your main frame (as if they were normal non-framed pages). In addition, to be able to create popup menus with SmartMenus 6, you also need to use a small add-on script on these pages.

SmartMenus 6 Add-on: Popup Menus

To learn how to use the Popup Menus add-on to create popup menus, please just take a look at the following online sample:

Setting up the page(s) in your navigation frame

To be able to call the popup menus in your main frame from links that are in your navigation frame, you need to use another small add-on script on the page(s) in your navigation frame.

SmartMenus 6 Add-on: Cross Frame Popup Menus

All you need to do is just link the small JS file in the head section of the page(s) that will load in your navigation frame. There are also a couple of variables that you will need to set in the add-on (the "c_addon_cross_frame.js" file):

c_mainFrameName='main'; // the name of the main frame containing your menus
c_mainFramePosition=1; // 1- bottom, 2- right, 3- top, 4- left

The c_mainFramePosition variable shows the position of you main frame relative to the position of your navigation frame. For instance, in this example it is set to 1 (bottom) as the navigation frame is the top frame and the main frame is the bottom frame.

After you do this, you will be able to call any popup menu in your main frame from the links in your navigation frame as if you were using the Popup Menus add-on on a normal non-framed page.

So basically the Cross Frame Popup Menus add-on brings the c_show() and c_hide() functions that are included in the Popup Menus add-on to your navigation frame so that they can be used for links (or other elements) in your navigation frame. Of course, this add-on also does another job - it handles the scrolling offsets in the main frame so that the menus are always displayed at the appropriate position on the viewport.

Download this sample

You can download the complete example or just see the configuration file and the images used for it.

Configuration file


Shortcuts and Related

Bookmark / Share