gsb said:
I have an HTML page loaded into an iFrame contained in a DIV tag.
From the loaded document how would I reference the DIV object?
You get the parent window with
parent
the document with
parent.document
and then you have the usual ways to access an element for instance
var div = parent.document.getElementById('divId');
so if the div has an id or you can set one then use that approach.
If you can't put an id on the div and you are really looking for a
generic solution to find the div container then post back, one would
need to loop through
parent.document.getElementsByTagName('iframe')
and compare name or location to find the relevant <iframe> element and
could then access the div as the parentNode