|
Hi guys - I am working on a menu using radio buttons on the left handed side of a frameset, and I cannot get it to work. Any help or advice would be muchly appreciated.
Regards,
Justin
<html>
<head>
<script type="text/javascript">
function go()
{
var goto="none";
if (document.nav.link[0].checked)
goto=nav.link[0].value;
if (document.nav.link[1].checked)
goto=nav.link[1].value;
if (document.nav.link[2].checked)
goto=nav.link[2].value;
parent.rightframe.location=document.getElementById(goto).value;
}
</script>
</head>
<body>
<form name="nav" id="nav">
<input type="radio" name="link" value="cit.html"/>CIT<br />
<input type="radio" name="link" value="currency.html"/>Currency<br />
<input type="radio" name="link" value="survey.html"/>Staff Survey<br />
<input type="radio" name="link" value="game.html"/>Game<br /><br />
</form>
<input type="button" value="Go" onClick="go();"/>
</body>
</html>
|
|
|
I just solved a similar problem myself
(after hoping your post would have an answer!)
Instead of this:
if (document.nav.link[0].checked)
try:
if (document.nav.link[0].checked == true)
Good Luck!
P.S. I came upon this by first putting the value
into an alert:
alert("hey: " + document.nav.link[0].checked);
|
|
|
|
|
|
|
|