View Full Version : Top Navigational Bar II - Frame Targeting Problem

05-26-2005, 07:42 PM
Script: Top Navigational Bar II
Url: http://www.dynamicdrive.com/dynamicindex1/topnavbar.htm

Hi, i am having a problem with the navigational bar II script. I want to target a frame for the links to load in but im not sure how to do it. There is a bit about it further down the page the script is on but im not sure where to put the bit of code.

Please help. Thank you.

05-27-2005, 08:44 AM
Well, seems pretty clear to me but, as an example, let's use one from the demo:
dhtmlMenu.addItem(new NavBarMenuItem("CNN", "http://www.cnn.com"));This will open in the same window or, if it is in a frame, the same frame, replacing whatever was there. If we want to target another frame, we need to know the name of this other frame (I assume you know about regular html frames, their names and the ordinary way to give a name to a frame, if not, just say so). Let's say the frame we want to target is called 'main'. We will change the above code to look like this:
dhtmlMenu.addItem(new NavBarMenuItem("CNN", "javascript:parent.main.location='http://www.cnn.com'"));