我有一个需要弹出窗口的“编辑状态”链接。 到目前为止,它根本没有加载,任何想法为什么以及如何修复它?
--- .js文件
function showEditStatus() {
document.getElementById( "edit_status" ).style.display = "block";
}
--- PHP页面,“edit_status”没有弹出
<div id="invoice_item">
<p>
<strong>Invoice #:</strong> <?=$invoiceData->ID?><br />
<strong>Receipt #:</strong> <?=$invoiceData->receipt?><br />
<strong>Date:</strong> <?=$invoiceData->stamp?><br />
<strong>Comments:</strong> <?=$invoiceData->comments?><br />
<strong>Status:</strong> <?=ucfirst( $invoiceData->status );?>
(<a href="#" onclick="showEditStatus(); return false;">edit status</a>)
<div id="edit_status">
<form method="post" action="edit_status.php">
<input type="hidden" name="id" value="<?=$invoiceID?>">
<table cellpadding="0" cellspacing="0" border="0" id="status_table">
<tr>
<td><strong>New Status:</strong></td>
<td>
<select name="status">
<?php
echo "<option value='received'";
if( $invoiceData->status == "received" )
echo " selected";
echo ">Received</option>";
echo "<option value='filled'";
if( $invoiceData->status == "filled" )
echo " selected";
echo ">Filled</option>";
echo "<option value='backordered'";
if( $invoiceData->status == "backordered" )
echo " selected";
echo ">Back-ordered</option>";
echo "<option value='shipped'";
if( $invoiceData->status == "shipped" )
echo " selected";
echo ">Shipped</option>";
echo "<option value='cancelled'";
if( $invoiceData->status == "cancelled" )
echo " selected";
echo ">Cancelled</option>";
?>
</select>
</td>
</tr>
<tr>
<td><strong>Invoice Comments:</strong></td>
<td><textarea name="memo"><?=$invoiceData->memo?></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Save"></td>
</tr>
</table>
</form>
</div>
答案 0 :(得分:0)
通过删除以下内容对CSS进行了修改:display:none;
至少现在它一直在页面上显示。
感谢提示Pointy!