I have a button that should pop up a div but it's not working.
<!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>
href with id="dia" is not showing the popup div _dia.. I'm with this problem since yesterday but no progress at all. I also tried dialog but it's not working too. Is it because the href is located inside a php form?
--- and delete this --- -- after this ---
– Tasos Mar 26 '14 at 05:25