I'm very new to JavaScript, and I have a webpage with 3 nested frames (a top one, and then a bottom one divided into two.) The top frame is titled Head, the bottom-left one is titled LeftFrame and the final one is titled RightFrame. Now, LeftFrame is a navigation bar, and I want to make it so that clicking on a link in LeftFrame will change the background color of Head. This is the code for the main webpage:
<HTML>
<HEAD>
<TITLE>Webcomics Review</TITLE>
</HEAD>
<FRAMESET BORDER=0 ROWS="12%,*">
<FRAME NAME"Head" NORESIZE SRC="Head.html">
<FRAMESET BORDER=0 COLS="15%,*">
<FRAME NAME="LeftFrame" NORESIZE SRC="navigation.html">
<FRAME NAME="RightFrame" NORESIZE SRC="mainpage.html">
</FRAMESET>
</FRAMESET>
</HTML>
And this is the code for the navigation bar which just has one link being worked on so far as a test:
<HTML>
<HEAD>
<TITLE>Webcomics Review</TITLE>
<SCRIPT>
function setColor1(number)
{
if (number==1)
{
parent.Head.document.body.style.backgroundColor=#FF0000;
}
return;
}
</SCRIPT>
</HEAD>
<BODY>
<CENTER>
<FONT SIZE=3 FACE=Haettenschweiler>Webcomics:
<BR><BR>
<A HREF="xkcd.html" TARGET="RightFrame" STYLE="text-decoration: none" onClick="setColor1(1)">Xkcd</A>
<BR><BR>
<A HREF="qc.html" TARGET="RightFrame" STYLE="text-decoration: none">Questionable Content</A>
<BR><BR>
<A HREF="qwantz.html" TARGET="RightFrame" STYLE="text-decoration: none">Dinosaur Comics</A>
<BR><BR>
<A HREF="survivingtheworld.html" TARGET="RightFrame" STYLE="text-decoration: none">Surviving the World</A>
<BR><BR>
</CENTER>
</BODY>
</HTML>
Could someone let me know what I'm doing wrong, as nothing about the Head frame changes when upon clicking the "xkcd" link in navigation (the one I'm using to test.)