469,273 Members | 1,790 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,273 developers. It's quick & easy.

Update a frame you're not in

Ade
Hi,

I have a page which uses frames - the user clicks on a menu in the left
frame, the requested information is loaded into the main frame. I would like
to have one small pane in the bottom of the screen telling the user when the
particular main frame page was last updated. I have the javascript to
generate the date text but can't find a way of updating the text in a frame
that I'm not actually in (if that makes sense!).

Can anyone please help me?

Thanks,

Ade
May 25 '07 #1
3 1165
Ade wrote:
Hi,

I have a page which uses frames - the user clicks on a menu in the left
frame, the requested information is loaded into the main frame. I would like
to have one small pane in the bottom of the screen telling the user when the
particular main frame page was last updated. I have the javascript to
generate the date text but can't find a way of updating the text in a frame
that I'm not actually in (if that makes sense!).

Can anyone please help me?
parent.frames['frame_name'].document.getElementById('STATUS_DIV').childNodes[0].nodeValue
= 'Whatever!';

Assuming a frame named "frame_name" and a element (DIV in my example)
with the ID "STATUS_DIV."

If you require negotiation of markup, use innerHTML.

Untested.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
May 25 '07 #2
On May 25, 6:46 pm, -Lost <maventheextrawo...@techie.comwrote:
Ade wrote:
Hi,
I have a page which uses frames - the user clicks on a menu in the left
frame, the requested information is loaded into the main frame. I would like
to have one small pane in the bottom of the screen telling the user when the
particular main frame page was last updated. I have the javascript to
generate the date text but can't find a way of updating the text in a frame
that I'm not actually in (if that makes sense!).
Can anyone please help me?

parent.frames['frame_name'].document.getElementById('STATUS_DIV').childNodes[0].nodeValue
= 'Whatever!';

Assuming a frame named "frame_name" and a element (DIV in my example)
with the ID "STATUS_DIV."

If you require negotiation of markup, use innerHTML.

Untested.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
Or,
window.top.frame_name.document.getElementById("STA TUS_DIV").innerHTML
= "Whatever";

May 25 '07 #3
Ade

"Darko" <da**************@gmail.comwrote in message
news:11**********************@q66g2000hsg.googlegr oups.com...
On May 25, 6:46 pm, -Lost <maventheextrawo...@techie.comwrote:
>Ade wrote:
Hi,
I have a page which uses frames - the user clicks on a menu in the left
frame, the requested information is loaded into the main frame. I would
like
to have one small pane in the bottom of the screen telling the user
when the
particular main frame page was last updated. I have the javascript to
generate the date text but can't find a way of updating the text in a
frame
that I'm not actually in (if that makes sense!).
Can anyone please help me?

parent.frames['frame_name'].document.getElementById('STATUS_DIV').childNodes[0].nodeValue
= 'Whatever!';

Assuming a frame named "frame_name" and a element (DIV in my example)
with the ID "STATUS_DIV."

If you require negotiation of markup, use innerHTML.

Untested.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.

Or,
window.top.frame_name.document.getElementById("STA TUS_DIV").innerHTML
= "Whatever";
Thanks to you both for your responses, I shall give them both a go.

Regards,

Ade
May 25 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Peter | last post: by
11 posts views Thread by Kamus of Kadizhar | last post: by
11 posts views Thread by Barney Norris | last post: by
354 posts views Thread by Montrose... | last post: by
3 posts views Thread by comp.lang.php | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.