Frames targeting!
Don't get frustrated, use our framestargeting guide andhit those teargets every time.

Frames links target practice!

Listed below are ways to target the content of your frameset. These will show you how to deliver the content you want , into the frame you want, using simple HTML and javascript targetting.

Remember to NAME YOUR FRAMES before you do anything else.

To open a page in frames using HTML

Use the following format <a href="filename.html" target="option">Link text</a>
Where option is one of the following:

'pagename'

Opens a page in a frame you named 'pagename'! Remember to call your frames something useful, i.e 'main' for the main content frame, 'nav' for the navigation frame, 'header' for your header etc. Remember NOT to use the following for your frame names..

_blank

Opens a page in a new window.

_top

Opens a page in the window occupied by the current frameset. ie replaces the frameset completely.

_self

Open the page in the same frame as the link text. Has the same effect as not using the target option at all!

_parent

Open the page in the frame that contains the current frameset. This is only different from _top when you are using nested framesets.

to top

The following 3 should be used with an action command. For example onclick, onmouseover etc, or in conjunction with other javascript functions

To open a page in a frame using javascript

"javascript:top.frames['framename'].location = 'filename.html';return true;";

To replace current frameset using javascript

"javascript:top.location = 'filename.html';return true;";

To open a page in a new window using javascript

"javascript:window.open('filename.html');return true;";

Example

To load pages 1, 2 and 3 into multiple frames named 'upper', 'main' and 'lower' respectively using HTML and Javascript

<a href="page1.html" target="upper" onClick="parent.main.location.href = 'page2.html'; parent.lower.location.href = 'page3.html';return true;">Multi-Load</A>

This is an example only. Bear in mind, when using this method, that when a visitor uses their browsers 'back' button, the pages are unloaded and replaced with the original pages one at a time. Therefore, it's more elegant to just load another frameset for this number of page changes.

to top

design tips

- : Site Map : -