<html>
<head>
<title>Popup Window</title>
</head>
<body>
<select name="staffs">
<option value=0>Staff List</option>
</select>
<script language=javascript>
var allStaffName = window.opener.document.getElementsByName("staff_name");
var allStaffId = window.opener.document.getElementsByName("staff_id");
var theStaffs = document.all.staffs.options;
var newOption;
var count;
for(i=0; i<allStaffName.length && i<allStaffId.length; i++)
{
newOption = new Option();
newOption.value = allStaffId[i].value
newOption.text = allStaffName[i].value;
count = theStaffs.length;
theStaffs.add(newOption,count);
}
</script>
</body>
</html>
<head>
<title>Popup Window</title>
</head>
<body>
<select name="staffs">
<option value=0>Staff List</option>
</select>
<script language=javascript>
var allStaffName = window.opener.document.getElementsByName("staff_name");
var allStaffId = window.opener.document.getElementsByName("staff_id");
var theStaffs = document.all.staffs.options;
var newOption;
var count;
for(i=0; i<allStaffName.length && i<allStaffId.length; i++)
{
newOption = new Option();
newOption.value = allStaffId[i].value
newOption.text = allStaffName[i].value;
count = theStaffs.length;
theStaffs.add(newOption,count);
}
</script>
</body>
</html>