RE: Onload event

by Klaas De Waele <klaas(at)gracegraphics.be>

 Date:  Wed, 4 Jul 2001 10:26:59 +0200
 To:  "'Larry Coats'" <lcoats(at)gte.net>,
"'Michele Hanson'" <michele(at)bit-net.com>
 Cc:  "'HWG Techniques'" <hwg-techniques(at)hwg.org>
  todo: View Thread, Original
Actually... now that I think of it...

Just do this:

PAGE1 = frame_left + frame_right
PAGE2 = frame_child1 + frame_child2
PAGE3 = frame_child1 + frame_child2

Put Page2 inside frame_right

Now, from frame_left, you can target frame_right and let page 3 load.  Now,
the TWO frames (actually one with a nested frameset) will load the source
html files defined for page3.

I use this on www.fiatcoupe.net (bottom navigation causes left middle and
content to change, left navi only targets content) and
www.f1-racing.f2s.com, same thing.

Quite obvious, no?

It's only when you have frames that don't seperate vertically or
horizontally that you have to use javascript.  And even then.... maybe you
can define a target with the meta http-equiv refresh tag...  Don't know.


- Kayjey -


-----Oorspronkelijk bericht-----
Van: owner-hwg-techniques(at)hwg.org
[mailto:owner-hwg-techniques(at)hwg.org]Namens Larry Coats
Verzonden: woensdag 4 juli 2001 5:49
Aan: Michele Hanson
CC: 'HWG Techniques'
Onderwerp: Re: Onload event




Michele Hanson wrote:

> I have a frameset that includes 3 frames -- I'll call them top, middle,
and
> bottom.  The top frame is a list of links, and when the user selects a
link,
> I need the middle and bottom frames to change while the top frame remains
> unchanged.  I used <.a href="filename.html" target="middle"> to change the
> middle frame, and have been trying to get the bottom frame to change using
> onLoad.  Can anyone help me with the correct syntax for the onload event
in
> the middle frame to make the bottom frame change?

There's a couple of ways you can do this. Your method would probably work,
but
seems a bit cumbersome. Since that method requires javascript (onLoad is
javascript), you can use a javascript method in the top frame:

<.script ...>     [Note: remove the .'s after the <'s]
function loadem (url1,url2)
{
  parent.middle.href = url1;    [Replace middle with whatever you've named
the
frame]
  parent.bottom.href = url2;
}
<./script>

Then in the link:

<.a href="javascript:loadem('xxx.html','yyy.html')">......<./a>

If you prefer a non-javascript solution, make your top-level frameset only
define two frames: top and middle-bottom. Then in the link in the top frame,
load another frameset that defines the bottom two frames into the
middle-bottom
frame.

If you'd rather want to use the onLoad method, you'd use
onload="parent.bottom.href='yyy.html'", where "bottom" is whatever you've
named
the frame. One drawback to this method is that the bottom frame won't begin
loading until after the middle one has fully loaded, which could slow down
your
performance.

Larry Coats

 

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.