By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,963 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,963 IT Pros & Developers. It's quick & easy.

Refreshing one iframe from another?

P: n/a
Hi there..

I have a file that contains three iframes, when one of the iframes is
updated (via <form target ...> then it must 'refresh/reload' the originating
iframe, ie. the iframe that sent the form action.

I've looked around, but I haven't managed to find a method yet, that does
not utilitize some MS only method. So how do I do it, and maintaining W3C
compatibility?

--
I doubt, therefore I might be.
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


Kim Noer wrote:

I have a file that contains three iframes, when one of the iframes is
updated (via <form target ...> then it must 'refresh/reload' the originating
iframe, ie. the iframe that sent the form action.

I've looked around, but I haven't managed to find a method yet, that does
not utilitize some MS only method. So how do I do it, and maintaining W3C
compatibility?


Not W3C but if you use
<iframe name="iframe1" ...
and
<iframe name="iframe2"
then you can script
if (parent.frames.iframe2) {
parent.frames.iframe2.location.reload();
}
that is more compatible with existing browsers than relying on W3C DOM
stuff where you need
<iframe id="iframe1" ...
and
<iframe id="iframe2"
with script
if (parent.document.getElementById) {
var iframe2 = parent.document.getElementById('iframe2');
if (iframe2 && iframe2.defaultView) {
iframe2.defaultView.location.reload();
}
}
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

P: n/a
"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:41***********************@newsread2.arcor-online.net
Not W3C but if you use (...)
that is more compatible with existing browsers than relying on W3C DOM


Thanks a bunch, this one worked without any problem (both in IE and
Firefox).

--
I doubt, therefore I might be.
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.