kasei
08-31-2007, 03:46 AM
Hi,
I want to "rotate" (change) the text in some frames without reloading the pages.
To do this I have created a "control" frame that will reload and then change the text, but I can't get it to work.
Code for visible frame "adframe":
<html><body background='./images/backgrounds/marble.jpg'>
<div id="ads"></div>
</body></html>
Code for "control" frame:
<script language="JavaScript"><!--
top.adframe.document.getElementById('ads').innerHTML="Buy My Stuff!";
</script>
it says "Error: 'top.adframe.document.getElementById(...)' is null or not an object"
It worked when I used top.adframe.document.write("Buy My Stuff!"), but it just added the line over an over, it didn't replace it.
What am I doing wrong?
I want to "rotate" (change) the text in some frames without reloading the pages.
To do this I have created a "control" frame that will reload and then change the text, but I can't get it to work.
Code for visible frame "adframe":
<html><body background='./images/backgrounds/marble.jpg'>
<div id="ads"></div>
</body></html>
Code for "control" frame:
<script language="JavaScript"><!--
top.adframe.document.getElementById('ads').innerHTML="Buy My Stuff!";
</script>
it says "Error: 'top.adframe.document.getElementById(...)' is null or not an object"
It worked when I used top.adframe.document.write("Buy My Stuff!"), but it just added the line over an over, it didn't replace it.
What am I doing wrong?