"Marco Snoek" <[mps]@DONT _ YOU^DARE%SEND/SPAM!!!@remove/this[@webmind.nl]@remove/this> writes:
on a page I have a couple of IFRAME's loaded on top of each other, only one
visible.
With a simple:
parent.document.getElementById("layername").style. visibility
I can easily make swith between the diffrent iframes with 'visible' /
'hidden'..
That code is executed inside one of the iframes, right?
Now.. After making a iframe visible, I have to trigger a function
_inside_ the iframe, to check if the content has to be reloaded /
refreshed.. But:
parent.layername.check('123');
returns an error saying layername doesn't exist...
How can I make javascript understand layername is a variable..???...???
Are you sure it *is* a variable? How is the name "layername" attached
to the iframe, with the "id" or "name" attribute (I would use "name")?
Which browser do you use?
If the code is executed in the same iframe as the first line, I would write:
parent.frames['layername'].check('123');
It should work. It does in the example here (using the name attribute
for the iframe):
<URL:file://localhost/D:/Home/lrn/html/faq/JSwindows.html#ref_3_12>
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'