471,888 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,888 software developers and data experts.

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 1245
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
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.