我有 2 帧 php 文件,首先调用 topFrame,底部调用 mainFrame。在 topFrame 我有一个带有下拉值的 php 文件,onchange 我想用另一个 php 文件重新加载这个框架。
下面是我的代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>RATEMASTER</title>
<script type="text/javascript">
function showsupli(sta)
{
alert ("sta");
if (sta == 'Yes')
{
window.open('ratesupli.php,'topFrame');
}
}
</script>
</head>
<body>
<?
echo "<form name='f1'>";
echo "<table width='730' border='0' align='center' cellpadding='0' cellspacing='1'>";
echo " <tr>";
echo " <td><span class='style3'>Suplimentry Invoice</span></td>";
echo " <td>";
echo "<select name='supli' onchange=\"showsupli(this.value);\"><option value=0>No</option>";
echo "<option value=1>Yes</option>";
echo "</select>";// Closing of list box
echo "</td>";
echo " </tr>";
echo "</table>";
echo "</form>";
?>
</body>
</html>