You're viewing a comment by binary and its responses.

binary Permalink
September 01, 2007, 20:27

Hi there ;)

Nice article. Although I'm not a big fan of video lectures yet (to be honest, I think I haven't seen any video lecture yet; shame on me ;D), I think I'm going to watch these today and/or tomorrow. Seems like a good material.

Before watching those lectures, I decided to read all your conspects about them (tx for conspects, they're quite valuable). While reading, I found one thing that I can't agree with:

"(06:49) self, parent and top are aliases of window object"

OK, all those 4 objects have the same type, but they are *not* the same object, therefore they can't be called aliases. Not in documents with frames...

As far as I understand, these were invented for working with multi-frame documents (frameset/frame, iframe), where they mean what they're called. "self" is the same window where the script runs, "parent" is parent window of a window where the script runs, and "top" is a top window. You may think of document with frames as of window with multiple child windows. If you have a document with iframe, you will have a window within a window. If there is another iframe in that first iframe, you will have a window within a window, that is within another window. If you need to get to a parent window while working in child window, you have to use parent or top instead of window. That's the purpose of those variables.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type first 3 letters of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.