How do I target a specific frame TN-W04

This FAQ answer is obsolete but preserved for historical interest.

The links in a generated site map have the target attribute set to _top. However, by accessing the source code you can change the target to _self, _parent, _blank, or to a frame name of the frameset you may already have created. For example, in a map created using the Tree View style, the change should be made to the function WriteAnch( url, row ) that is defined before the body tag of the html file. This is explained below:

function WriteAnch( url, row )
    tag = '<a ';
    if ( row )
        tag += 'onClick="return parent.ClickRow(' + row + ')" + name="' + row + '" ';
        tag += 'target="_top" ';
    tag += 'href="' + url + '" >';
    WriteDoc( tag );


If the frame where you wish the url to load is called: "main", then on line 7 of the above code, "_top" should become "main". Save your file and try mapping again.

NB. Editing the source code is only recommended for users familiar with JavaScript

See Also: How do I expand the tree view to the second level by default

Applies To: PowerMapper 2.00 and later

Last Reviewed: Feb 11, 2015