Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IFRAME in HTC

3 views
Skip to first unread message

Nic Roche

unread,
Aug 6, 2006, 12:44:02 PM8/6/06
to
Hi,

I have a PageControl HTC that uses an IFRAME for the page of each tab.

Problem is the DOM from the IFRAME cannot see the DOM of the top page (the
page that hosts the HTC).

Is there a workaround for this?

tia
Nic Roche

anthony....@googlemail.com

unread,
Aug 29, 2006, 10:05:02 AM8/29/06
to
Hi Nic,

You can use:
element.document

this works as the element refers to the element as it lies in the
containing document and not the element's internal document. "element"
is a key word inside a htc.

Cheers
Dewy

Nic Roche

unread,
Aug 29, 2006, 6:59:02 PM8/29/06
to
As I said the IFRAME is not aware of its parent, so how do you see it being
able to communicate with the document.element (which is a child of the
parent)...

anthony....@googlemail.com

unread,
Aug 30, 2006, 4:01:24 AM8/30/06
to
Sorry, wasn't concentrating enough there...

If you want to get access to the container DOM, then, from inside the
IFRAME use:

window.parent.document

This will give you access to the page containing the htc's document.

I am wondering why you would want to do this though? Shouldn't the HTC
be taking care of its internal elements for encapsulation reasons?

Cheers,
Dewy

0 new messages