vbcoder
02-19-2007, 04:02 AM
I'm a newbie to javascript, but using my programming experience from other languages.
I've got a frames page. In the bottom frame is a table, with each cell having a different bgcolor. I can change the colour of the bottom page on mouseover with the following:
<td bgcolor="#cccccc" width="13"><B><A ONMOUSEOVER="document.bgColor='#cccccc'"><FONT SIZE=3>B</FONT></A></B></td>
What I want to do is to also change the top frame page's bgcolor.
I've tried(in the bottom page):
<td bgcolor="#cccccc" width="13"><B><A ONMOUSEOVER ="parent.top.recolourPage('#cccccc')"><FONT SIZE=3>B</B></FONT></A>
and (in the top page, <Head> section):
<script language="JavaScript" type="text/javascript">
function recolourPage(newcolor)
{document.bgColor=newcolor}
</script>
but this doesn't work.
The pages where I've put the code are footer.htm and header.htm
The frames are called top and bottom.
Help!!!!:(
Thanks
VBcoder
I've got a frames page. In the bottom frame is a table, with each cell having a different bgcolor. I can change the colour of the bottom page on mouseover with the following:
<td bgcolor="#cccccc" width="13"><B><A ONMOUSEOVER="document.bgColor='#cccccc'"><FONT SIZE=3>B</FONT></A></B></td>
What I want to do is to also change the top frame page's bgcolor.
I've tried(in the bottom page):
<td bgcolor="#cccccc" width="13"><B><A ONMOUSEOVER ="parent.top.recolourPage('#cccccc')"><FONT SIZE=3>B</B></FONT></A>
and (in the top page, <Head> section):
<script language="JavaScript" type="text/javascript">
function recolourPage(newcolor)
{document.bgColor=newcolor}
</script>
but this doesn't work.
The pages where I've put the code are footer.htm and header.htm
The frames are called top and bottom.
Help!!!!:(
Thanks
VBcoder