I have an "edit status" link that needs to popup a window开发者_如何学运维. So far, it does not load at all, any ideas why and how it can be fixed?
--- The .js file
function showEditStatus() {
document.getElementById( "edit_status" ).style.display = "block";
}
--- The PHP page, the "edit_status" does not popup
<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>
Made a modification in the CSS by removing: display: none;
At least now it's constantly showing on the page.
Thanks for the tip Pointy!
精彩评论