View Full Version : Opening Radio Button Links in a Separate Frame

12-07-2010, 05:11 AM
Hello everyone,

I'm very new to Javascript, and I'm trying to build a simple webpage with frames with navigation links that open in other frames. I have three frames in the main part of my webpage, A, B, and C. Frame A is the header, Frame B is where I keep the links, and Frame C is where I want the links to display.

I'm trying to get the links in Frame B to work both as text links and as radio button links. So far, I have managed to get the text links to open in Frame C as I wanted to, but when it comes to the radio buttons, I encounter a problem. The radio buttons do open as links... Except, they open in the frame they're contained, Frame B, rather than in Frame C like I want them to. Does anyone know how I might fix this problem? Is the coding completely wrong or is it just a simple mistake I've overlooked? Here is the relevant code:

This is the code for the main page with the frames:


<frameset rows="100,*">

<frame src="Hello.htm" NAME="A"/>
<frameset cols="25%,75%">
<frame src="Linklist.htm" NAME="B"/>
<frame src="Start.htm" NAME="C"/>



And this is the code for my links:



function go(loc) {
window.location.href = loc;


<BODY BGCOLOR="#000000" TEXT="#green">

<form name="form">
<input type="radio" name="loc" onClick="go('http://www.wikipedia.org/');" TARGET="C"> <A HREF="http://www.wikipedia.org/" TARGET="C">Wikipedia</A><br>
<input type="radio" name="loc" onClick="go('http://dictionary.reference.com/'); TARGET="C""> <A HREF="http://dictionary.reference.com/" TARGET="C">Dictionary.com</A><br>

Any and all help would be much appreciated. This has me really stumped. Thank you for your time! :)