Click here to Skip to main content
15,894,410 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
main page is :
XML
<html>
<head>
    <title>Turnshop Corp.</title>

</head>

<frameset rows="150,*,100" border="1"   >

<frame name="banner" scrolling="no"  src="banner.html"   >
<frameset cols="10%,*,10%" border="0">

<frame name="frame1" >

<frame name="main" src="image.html"  >

<frame name="changcolor" src="changcolor.html"   >
</frameset>
<frame name="frame2" >

 <noframes>
<body  >
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>





change color is:
XML
<html >
<head>
    <title></title>
    <script >
        function check(color1) {

                     document.bgColor = color1;
        }

    </script>
</head>
<body >
<form name="form1" scrolling="no" >

    Which is your favorite color for home page?
    <br />
    <input type="radio" name="color" onclick="check(this.value)" value="Aqua" />Aqua<br />
     <input type="radio" name="color" onclick="check(this.value)" value="Blue" />Blue<br />
     <input type="radio" name="color" onclick="check(this.value)" value="GoldenRod"  />GoldenRod<br />
        <input type="radio" name="color" onclick="check(this.value)" value="HotPink" />HotPink<br />
     <input type="radio" name="color" onclick="check(this.value)" value="Fuchsia" />Fuchsia<br />
     <input type="radio" name="color" onclick="check(this.value)" value="Coral"  />Coral<br />
</form>
</body>
</html>
Posted
Comments
OriginalGriff 4-Jan-15 8:06am    
And? What is your question?
What does it do that you didn't expect, or not do that you did?

1 solution

Change the javascript function as below

C#
parent.banner.document.bgColor = p;
parent.frame1.document.bgColor = p;
parent.frame2.document.bgColor = p;
parent.changcolor.document.bgColor = p;
parent.main.document.bgColor = p;


NOTE: Frames and Frameset are obsolete, try changing page design if possible. Its will be more flexible and easy to manipulate and handle.

Regards,
Sujay Chakraborty
 
Share this answer
 
Comments
Member 11161828 6-Jan-15 14:13pm    
Thank you so much, you have solved my problem.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900