I have been learning and practicing JS for a few weeks now. I have a good
understanding of most things and came up with a few complex modules.
Basically I am almost comlpleted my library code that is needed for some
Unfortunately I am having a real confusion with IFrames. In order to achieve
some of my goals I have arrived to the conclusion that IFrames will suit the
Well, in theory they would. In practice I have no idea...
... why => window.parent.parent == window.parent ???
I have a page with a DIV and an IFRAME in it and I fill the DIV with a table
etc, and load the IFRAME with a URL. From the content of the DIV I use JS to
change the content of the IFRAME and I like to trigger from the content of
the IFrame a reload on the whole page. While trying to achieve the I had to
play around with reference to objects, and this is when I have found the
So "window.parent" actually the same as "window.parent.parent". I thought I
have to do more test, did not want to beleive it!
So I have created a variable in the main page ->
var oTask_DTV_Var = " Orig Value";
....using from the page contained in the IFrame ...
window.alert(window.parent.oTask_DTV_Var) -> " Orig Value";
window.alert(window.parent.parent.oTask_DTV_Var) ; -> " Orig Value";
So both of the above expressions produce the same result.
??????? What am I missing????