1

我有一个应该弹出一个 div 的按钮,但它不起作用。

<!DOCTYPE html>
    <html>
        <head>
            <title>Soapie</title>
            <meta charset="utf-8" />
            <meta name="viewport" content="width=device-width, initial-scale=1"> 
        <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
        <script src="//code.jquery.com/jquery-1.9.1.js"></script>
        <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
        <link rel="stylesheet" href="/resources/demos/style.css">

         </head>
        <body>

        <div data-role="page" id="_index" >
    <div data-role="header" data-theme="b" >
    <a data-role="button" href="index.php" data-icon="home" data-iconpos="left" class="ui-btn-right">Back</a>
    <h1>Patient Details</h1>
    </div>
    <div data-role="content">
    <?php
        include('Nethost.php');
            $patient = $_POST['patient'];
            $query = mysql_query("select patientid, fname, substring(mname,1,1) as midd, sname, subjective, objective, assessment, planning, evaluation from patient WHERE patientid='$patient'");

            while($rows = mysql_fetch_array($query))
            {
                if($rows==NULL)
                {
                  echo "No data";
                }
                else
                {
                    $fname = $rows['fname'];
                    $midd = $rows['midd'];
                    $sname = $rows['sname'];
                    $patientid = $rows['patientid'];
            }
        }
        ?>
        <table style="margin-left:auto; margin-right:auto">
        <tr>
        <td>Patient Name</td>
        </tr>
        <tr>
        <td><input ID="txtname" type="text" readonly="true" value="<?php echo "" .$fname. " " .$midd. ". " .$sname. ""; ?>"></td>
        </tr>
        <tr>
        <td>
        <a id="dia" href="_dia" data-rel="popup" data-overlay-theme="a">New Diagnosis...</a>
        </td>
        </tr>
        </table>
        </form>
        </div>
        </div>

         <div data-role="popup" id="_dia">
                <table align="center" cellpadding=3>
            <?php
            include('Nethost.php');
            $query = mysql_query("select * from diagnoses order by dname");

            while($rows = mysql_fetch_array($query))
            {
                if($rows==NULL)
            {
                echo "No data";
                    }
                        else
                    {
                    $dname = $rows['dname'];
                    $diagnosesid = $rows['diagnosesid'];

                echo "<tr>";
                echo "<td>" .$diagnosesid. "<td>";
                ?>                  

            <?php } ?>
            <?php }?>
        </tr>
        </table>
        </div>

        </body>
    </html>

带有 id="dia" 的 href 没有显示弹出 div _dia.. 从昨天开始我就遇到了这个问题,但没有任何进展。我也尝试过对话,但它也不起作用。是因为href位于php表单内吗?

4

0 回答 0