The problem, of course, is to now USE this information (knowledge) to our advantage.
Let's apply this to the web page you are currently viewing. The highest level of object is the browser window you are viewing this through. This means the entire window, the part that you can click on the border with your mouse and move around your computer screen. There are three sub-objects to the window:
1) Location object.
2) Document object.
3) History object.
The location object is the part that says 'Location:' (Netscape) or 'Address' (Internet Explorer) and contains the URL (Uniform Resource Locator) of this page.
The document object is the part of the window which you are reading this text from. It can contain HTML components such as text, tags, images and links.
The third component is the history object . This component stores the history of where this window has been since it was created. Yep, I can see exactly where you came from and how you got here.
Then there's the breakfast component that allows me to know what you ate for breakfast this morning. Okay, maybe not. Just checking to make sure you're still awake.
And, since they really don't fit anywhere, now is as good a time as any to discuss frames. The problem with frames is that they don't fit neatly in this object heiarchy. They squeeze in between the window and it's sub-components. And while they are in the window, they don't posess the characteristics (properties) of the window like all good sub-objects do. Case in point, history. The window has a history of where it's been. But the frame inside the window, well, it has its own history. That is why hitting the 'Back' icon doesn't always take you back there you think it should when frames are utilized. Also, when you print the 'window' you never really know what will show up in the frame section. Finally, the URL of the window typically does not reflect where in the world the information displayed in the frame is really coming from. All of these are reasons why some restraint should be exercised in the use of frames.
Okay, back to our discussion. Each object can contain methods.