<< back to knowledgebase home
Making menu links open in frames or iFrames (MM2)
Article Applies To:
MenuMachine 2 only
GoLive CS, CS2
Mac, Windows
Article ID: 000138
Category: Menu Editing Issues
Issue
If the menu is in one frame but you want the linked page to open in a different frame, you can do so by setting the Target for the menu item. You can also open linked pages into an iFrame (Inline Frame).
Solution
To set the Menu Item Target to open a page in a Frame or iFrame:
- Open the page which contains the Frame Set or iFrame. A page containing an iFrame should be open in Layout view. A Frame Set page should be open in Frame Editor view so you can see the names of your frames.
- Make sure your frames names are "legal" according to the frame name guidelines below.
- Open the menu in the MenuMachine 2 Menu Editor.
- Select a menu item.
- In the Link field, use the pick-whip to enter the URL of the page you want that menu item to open.
- Take note of the name of the frame or iFrame you want the page to open into.
- Enter the exact name of that frame into the Target field. The name of the frame or iFrame should be exactly the same - do not add any other characters before the name. Only the four default targets have an underscore (_) in their names.
Tip for Frame Set pages (not iFrames): It is easier to set the Target if the page containing the frames is open so that GoLive can add the names of the frames to the pull-down list next to the Target field. You can pull down the list and choose your custom frame name which will appear below the standard items (_top, _parent, _self, _blank). This will set the Target correctly. (This method does not work for iFrames. iFrame names must be entered manually.)
- Save the menu.
- Test the page containing the frame set in a browser. The menu item will open the linked page in the frame you specified.
To Link to an Anchor within a Frame or iFrame:
If you want to link to an anchor within the page which is loading into the iFrame, append the link with a # then the name of the anchor. The Link and Target fields would then look something like this:
Link: /xxx.html#myanchor
Target: myframe
Tip: If you use the disclosure triangle next to the page name in the site window, you can see each of the anchors in the page. You can use the pick-whip from the Link field to link directly to the anchors.
To Name a Frame or iFrame:
It is very important to use the correct naming conventions when naming frames so links to frames will work in the browser.
- Click in a frame or iFrame to select it.
- Go to the Inspector and enter a name into the Name / ID field. (See guidelines below.)
- Next to the Name / ID field, use the pull-down menu to choose Name & ID (this ensures maximum browser compatibility).
- Repeat for any remaining frames.
Frame and iFrame Name Guidelines:
- Frame names may only contain alpha-numeric characters (letters & numbers) and underscores (_).
- Frame names must not contain spaces.
- Frame names must begin with a letter, not a number or underscore.
- Frame names are case-sensitive.
- Frame names must not be reserved terms (e.g. content, top or body) which are used elsewhere in HTML or JavaScript. It’s hard to know what all these terms are but if you don’t use words that are used anywhere else in GoLive, and you try to ‘personalize’ the names a little, the names should be safe to use.
- Frame names should be unique e.g. my_nav or sideframe or info_pages.
These pages have a list of various words to avoid:
http://javascript.about.com/library/blglobal.htm
http://javascript.about.com/library/blclassobj.htm
http://javascript.about.com/library/blreserved.htm
Last updated: May 15, 2007
This article has been viewed 18451 times.
Related articles