Results 1 to 2 of 2

Thread: Top Navigational Bar II - Frame Targeting Problem

  1. #1
    Join Date
    May 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Top Navigational Bar II - Frame Targeting Problem

    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.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, seems pretty clear to me but, as an example, let's use one from the demo:
    Code:
    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:
    Code:
    dhtmlMenu.addItem(new NavBarMenuItem("CNN", "javascript:parent.main.location='http://www.cnn.com'"));
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •