[thelist] Re targeting a specific frame within a frameset

Michael Pemberton mpember at phreaker.net
Fri May 3 11:06:01 CDT 2002

Rachel Starr wrote:

> [Michael Pemberton wrote:
> Try using either server code or JS to create a custom frameset based on
> a variable being passed.
> eg: index.php?page=page123.html
> Without knowing more details such as your server's / site's setup, I
> don't what to go into too much detail in case I take too many steps in
> the wrong direction. :)]
> I'm looking for JS for this.  Can I have some sort of onClick function
> that
> loads the specific url into the frame of the frameset called by the href?

If a normal href is clicked, it will normally load in the frame that
contains it.  This requires no extra coding.
If you are loading a link that is clicked in one frame and loads in
another, you use the "target" property of the href tag.

  <frame src="menu.html" name="fraMenu" noresize scrolling="no">
  <frame src="intro.html" name="fraMain" noresize>

<href src="newpage.html" target="fraMain"> Opens in Main Frame </a>

You can see that no JS is required for the above scenario.

Michael Pemberton
mpember at phreaker.net
ICQ: 12107010

More information about the thelist mailing list