Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3693812
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:25:17+00:00 2026-05-19T04:25:17+00:00

I’m very new to JavaScript, and I have a webpage with 3 nested frames

  • 0

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.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:25:18+00:00Added an answer on May 19, 2026 at 4:25 am

    try this:

    //MAIN FRAMES PAGE
    <html>
    <head>
    <title>test</title>
    <script type="text/javascript">
    function setColor1(color)
    {
        HEAD.document.body.style.backgroundColor=color;
        return;
    }
    window.setColor = function(a){setColor1(a);}
    </script>
    </head>
    <FRAMESET BORDER=1 ROWS="12%,*">
    <FRAME NAME="HEAD" NORESIZE SRC="frame_head.html" id="HEAD">
    <FRAMESET BORDER=1 COLS="15%,*">
        <FRAME NAME="LeftFrame" NORESIZE SRC="frame_footer.html">
        <FRAME NAME="RightFrame" NORESIZE SRC="frame_body.html">
    </FRAMESET>
    </FRAMESET>
    </html>
    //END MAIN FRAMES PAGE
    /**************************************************************************/
    //BODY PAGE (RightFrame)
    <html>
    <head>
    <title>test</title>
    <script type="text/javascript">
    function setColor(color)
    {
        window.parent.setColor(color);
        return;
    }
    </script>
    </head>
    <body>
        <a href="#" onclick="setColor('#f00')">one</a>&nbsp;
        <a href="#" onclick="setColor('#0f0')">two</a>&nbsp;
        <a href="#" onclick="setColor('#00f')">three</a>&nbsp;
        <a href="#" onclick="setColor('#f0f')">four</a>&nbsp;
        <a href="#" onclick="setColor('#ff0')">five</a>&nbsp;
        <a href="#" onclick="setColor('#0ff')">six</a>&nbsp;
    </body>
    </html>
    /**************************************************************************/
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.