主页.php
<a href='javascript:void(0);' onclick="pepz('<?php echo"ppc-mngt_transfer.php?id=$i->sm_id"; ?>', 'myPop1',400,400)"><?php print"$i->sm_jo<br>$i->sm_custo_name"; ?></a>
ppc-mngt_transfer.php
<script type="text/javascript">
function refreshAndClose() {
window.close();
window.opener.location.reload(true);
}
</script>
<body onbeforeunload="refreshAndClose();">
<form name='mainform' method='post' action='do.php?ppc/workload'>
<?php
print "<h1>COPY TO WORKLOAD</h1>";
print "<table class='clean_form'>";
print "<tr><td>J.O. Number</td><td><input name='ppc_jo' value='$i->sm_jo' style='width:250'></td></tr>";
print "<tr><td>Customer Name</td><td><input name='ppc_custo_name' value='$i->sm_custo_name' style='width:250'></td></tr>";
print "<tr><td>Description</td><td><input name='ppc_subject' value='$i->sm_subject' style='width:250'></td></tr>";
print "<tr><td>Date Start</td><td><input name='ppc_dpdate' value='$i->sm_dpdate' style='width:250'></td></tr>";
print "<tr><td>Duration</td><td><input name='ppc_proj_duration' value='$i->sm_proj_duration' style='width:250'></td></tr>";
print "<input type='hidden' name='ppc_m_id' value='$id'>";
print "</table>";
print "<tr><input type='checkbox' name='ppc_mark' value='ok' checked/></tr>";
?>
<input type="submit" value="submit">
</form>
</body>
我认为我的代码执行此操作 > REFRESH 然后关闭 ...。我需要的是在单击弹出窗口中的提交按钮后关闭,然后刷新父页面。请帮助我,我对 Javascript 知之甚少。