PDA

View Full Version : Target outside the iFRAME (parent)


Quiet Storm
10-12-2002, 12:26 AM
I have this:

document.all.moredivs1.innerHTML=w1c1.clientHeight+2

It sits on a page in an iFRAME named "thisi".

I'd like this to direct the output to the main page (not inside the iFRAME).

Can someone please tell me where to put .thisi to make it work? :confused:

adios
10-12-2002, 02:17 AM
Shouldn't have to mention the iframe at all if you're scripting from within it - just:

top.document.all.moredivs1.innerHTML=w1c1.clientHeight+2

...assuming'w1c1' is defined in the iframe, and 'moredivs1' is in the containing page, and you're using IE.

chrismiceli
10-12-2002, 02:54 AM
the way i found to call variables from another frame is this, if this is what you want, you do need to give us more code of be more specific.

function hi() {
test = parent.top.thisiframename.varname
}
<body onLoad="hi()">
alert(test)

that is how i use variables from other frames.