Remember when we talked about an object hierarchy?
Windows and frames are similar. Consider this frameset...
<frameset cols="200,*"> <frame src="dir.html" name="leftframe"> <frame src="start.html" name="rightframe"> </frameset>
The top level object is
Think of frames as a main window with child windows within it. window is the main window.
The left frame is a child of that window and we refer to it by name...
Note that "leftframe" comes from the name of the frame. If you named your frame "hunnypot", you would reference it with window.hunnypot. The right frame is similar...
Copy and save this as left.html...
<html> <head> <title></title> </head> <body> Click here </body> </html>
Copy and save this as right.html...
<html> <head> <title></title> </head> <body> </body> </html>
And this as master.html...
<html> <head> <title></title> </head> <frameset cols="200,*"> <frame src="left.html" name="leftframe"> <frame src="right.html" name="rightframe"> </frameset> </html>
What we're going to do is make a link in the left frame write to the document in the right frame.
|Lessons: Intro 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25|
|HTML 4.0 Reference Google Groups (Advanced Search)|