Frame Element question...

M

Mel

i have 3 iframes in 3 rows named TOP, MID & BOT

inside MID i have 2 iframes LFT & RGT

i need to hide LFT frame and i know how to hide it

i just have a hard time figuring how to get to that element

i tried something like:
set var myframe = parent.MID.LFT;

and it does not work

please help
 
K

kaeli

[email protected] enlightened said:
i have 3 iframes in 3 rows named TOP, MID & BOT

inside MID i have 2 iframes LFT & RGT

i need to hide LFT frame and i know how to hide it

i just have a hard time figuring how to get to that element

From where?
The syntax is different depending on where (which frame) the code is running
from.

OR you can use top (that's reserved as the topmost window - you might want to
call your top frame TOPFRAME instead of TOP). But if you use top and your
site gets caught in someone else's frames, it will break.
Using top will work from any iframe.

top.frames["MID"].frames["LFT"] will reference that iframe from any of the
child frames.
i tried something like:
set var myframe = parent.MID.LFT;

set?
What is this 'set' you speak of? vb has a 'set'...

var iframe_win = top.frames["MID"].frames["LFT"];

Keep in mind that a frame/iframe is a window object. If you need the
document, you have to get it.
var iframe_win_doc = iframe_win.document;

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top