Can someone please tell me why this script always produces an output of undefined No matter which radiobutton I press
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<script language=”JavaScript”>
function showgame()
{
var frm = document.forms[‘form1’];
frm.textfield.value = frm.RG1.value;
}
</script>
</head>
<body>
<p> </p>
<form name=”form1″ method=”post” action=””>
<p> </p>
<p>
<label></label>
</p>
<p>
<label>
<input type=”radio” name=”RG1″ value=”D”>
DTC</label>
Input
<input type=”text” name=”textfield”>
<br>
<label>
<input type=”radio” name=”RG1″ value=”M”>
MIA</label>
<br>
<label>
<input type=”radio” name=”RG1″ value=”L”>
LNC</label>
</p>
<p>
<input type=”Button” name=”Button” value=”Button” onClick=”showgame()”>
</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</form>
<p>
<label></label>
</p>
<p>
<label></label>
<br>
</p>
<p> </p>
</body>
</html>