<html>
<head>
<script language=javascript>
function updateopen()
{
var c_value = "";
var cb = document.getres.checkbox;
for (var i=0; i < cb.length ; i++)
{
if (document.getres.checkbox[i].checked)
{
c_value = c_value + document.getres.checkbox[i].value + "\n";
}
}
alert(c_value);
//window.opener.document.getElementbyId(numbe33).value = c_value
//window.close();
}
</script>
</head>
<body>
<?
echo '<form name="getres" id="getres">
<p align=center><table border=1 cellpadding=3 cellspacing=0><tr>
<th width=100px valign=bottom nowrap>
<font face=arial size=3><br> Item Number</font></th>
<th colspan=2 widht=200px valign=bottom nowrap><font face=arial size=3><br> Item Name </font></th></tr>';
for ($g=0;$g < sizeof($a); $g++)
{
echo '<tr><td align=middle name=number[] id=number nowrap><font size=2>'.$a[$g].' </font></td>';
echo '<td align=middle name=itname[] id=itname nowrap><font size=2>'.$b[$g].' </font></td>';
echo '<td><input type=checkbox name=checkbox[] value='.$a[$g].'></td></tr>';
}
echo '</table><br>';
echo '<input type=button value=go onClick="updateopen()"></p>';
echo '</form></body></html>';
}
include('Spec_dbclose.i');
?>
it gives me "cb is undefined" error dont know what is wrong ?????????