el22
10-29-2003, 10:56 PM
I need to change the text that two layers or divs (i dont know if it would make a difference in this case to use a layer or div) have in another frame. That frame is like a header that shows a title and a subtitle.
I.e.: i have a page in the "main" frame that in the OnLoad event calls a function that should change the two layers' content in the other frame dynamically.
The current function I made is:function changeheadertext()
{
parent.header.document.getElementById(headertitle).innerHTML="titletext";
parent.header.document.getElementById(headersubtitle).innerHTML="subtitletext";
}
being "header" the frame name where the layers are and "headertitle" and "headersubtitle" the layers IDs.
However, (:P) its not working and i'm not sure how to change the contents of a layer in a different frame. Could you please give me a hand with this?
Thanks in advance for any help you could give me.
I.e.: i have a page in the "main" frame that in the OnLoad event calls a function that should change the two layers' content in the other frame dynamically.
The current function I made is:function changeheadertext()
{
parent.header.document.getElementById(headertitle).innerHTML="titletext";
parent.header.document.getElementById(headersubtitle).innerHTML="subtitletext";
}
being "header" the frame name where the layers are and "headertitle" and "headersubtitle" the layers IDs.
However, (:P) its not working and i'm not sure how to change the contents of a layer in a different frame. Could you please give me a hand with this?
Thanks in advance for any help you could give me.