473,395 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

IFrames and mistery! Can someone explain?


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
development soon.

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
best.

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
above ...

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????

TIA,

Tom


Jul 23 '05 #1
1 1515
VK
> ??????? What am I missing????

That you cannot go beyond the Creation point :-)
You cannot trace the human parentship deeper than Adam ;-), and you cannot
go further than the original parent window. After that 'parent' becomes a
self-reference ('self' property).
You may try though window.parent............parent.....parent and so on, to
see if the Lord pops up anywhere in the chain :-)
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: maxim vexler | last post by:
I'm reading a lot of talks lately about the term iFrame and with your permission would like to ask a few question about that : - what is iFrame, i mean what is it good for ? - does all the...
0
by: Dan Popa | last post by:
Check out the following 2 links: http://www.batisdev.com/admin/test_1images.asp http://www.batisdev.com/admin/test_2images.asp First page contain 4 IFRAMES and 1 IMG tags. Second page contain 4...
7
by: Scott | last post by:
Hello All, I've been reading all of the various issues with Iframes in netscape. I have tried all of the various fixes posted, and have even implemented both an iframe and ilayer. My problem is...
3
by: Nick Tew | last post by:
Hi, Firstly, any help would be gratefully received. Im using several iframes on a single page and would like individual 'back' and 'forward' buttons located in each of the iframes which only...
1
by: Nick Tew | last post by:
Hello, This relates to the previous post i've left. This problem is do with the browser's back and forward buttons. When clicked, can it be made to affect any history NOT in the iframes....
5
by: Frances | last post by:
I need to replace iframes acc. to what option user chooses in a sel obj.. but figured have to load a blank iframe when pg loads so I can replace it.. (iframe gets put in a pre-existing div..) this...
2
by: Guadala Harry | last post by:
1. Are IFrames supported only in uplevel versions of IE? If not IE exclusively, what browsers support IFrames? 2. Are IFrames going to be supported in the future - as far as anyone knows - or...
3
by: Giggle Girl | last post by:
Is there a way to use Javascript to detect if a browser supports IFrames, or (if it DOES support them) that IFrame use is enabled? Thanks, Ann
19
by: wmanzo | last post by:
I have a really professional conspiracy movie site and I use tons of layers and an external scroll bar assembly. I would like to put the various sections into MS Iframes and in order to clean up...
2
by: ericisjusteric | last post by:
I have a page with multiple iframes and need to have the user (ie6) be able to click a button to refresh any one of the iframes - but also to click another button at the top of the page to refresh...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.