Javascript açılır konular

0 Cevap php

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?

---. Js dosyası

function showEditStatus() {
document.getElementById( "edit_status" ).style.display = "block";
}

--- PHP sayfasında, "edit_status" tıklıyorsunuz değil

    <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>&nbsp;</td>
                                    <td><input type="submit" value="Save"></td>
                                </tr>
                            </table>
                        </form>
                    </div>

0 Cevap