A very simple question (for you)

S

Simon

A very simple question that is very hard to google..(so please be so kind to
answer it, if you have the answer.)

How can I reach an iframe, located in another frame.
Situation: frameset of three frames.

Left frame (LFRAME)
Right frame (RFRAME)
Top frame (HFRAME)
(and an iframe, called progressbar)

In the right frame I have a form, that goes to the following function on
Onsubmit. (<FORM NAME="GetReport" method=""post""
onSubmit="formProgressBar(this)">

function formProgressBar(form) {
frames.['progressbar'].location.href=http://progressbar.htm;
}

This works, (i have an Iframe on this page called progressbar)
But i moved the iframe to the Top frame.

How can i reach it now? (In the frame-notation)

So when the form is "Onsubmit", in the right frame(FRAMEH), the Topframe
(HFRAME) has to load a page into it's iframe.

Thanks, Simon
 
S

scripts.contact

So when the form is "Onsubmit", in the right frame(FRAMEH), the Topframe
(HFRAME) has to load a page into it's iframe.

top.document.frames.HFRAME.document.frames.progressbar.location.href="Blah.."
 
R

Richard Cornford

scripts.contact said:
top.document.frames.HFRAME.document.frames.progressbar.location.href="Blah.."

Attempting to use the - frames - collection of - document- objects is
less well supported, and so less reliable/cross-browser, than using
the - frames - collections of window/global objects in web browsers. So
more like:-

top.frames.HFRAME.frames.progressbar.location = "Blah..";

Though a more defensive approach would cover circumstances where the
contents of - HFRAME - had not finished loading, or failed to load (for
whatever reason), when the code was executed.

Richard.
 

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

Forum statistics

Threads
474,100
Messages
2,570,635
Members
47,242
Latest member
BarrettMan

Latest Threads

Top