我在从相应行旁边的ajax显示重新获取的数据时遇到问题,它显示在表之后,但是我希望在该特定行之后显示它,其余的行将被隐藏。 这是我的代码。响应来自一个形式的ajax很好,所以我在这里只发布我想要显示的ajax文件和数据表。
<?php include("inc/header.php"); ?>
<!-- START OF MAIN CONTENT -->
<div class="mainwrapper">
<div class="mainwrapperinner">
<?php include("inc/mainleft.php"); ?>
<div class="maincontent noright">
<div class="maincontentinner">
<ul class="maintabmenu">
<li class="current"><a href="index.php">Regular Booking</a></li>
<li><a href="dashboardcorporate.php">Corporate Booking</a></li>
<li><a href="dashboardpersonal.php">Personal Booking</a></li>
<li><a href="dashboardtopup.php">Topup Booking</a></li>
</ul><!--maintabmenu-->
<div class="content2">
<div class="contenttitle radiusbottom0">
<h2 class="table"><span>RegularBooking Table</span></h2>
</div><!--contenttitle-->
<?php if($_GET['msg']=="update") { ?>
<div class="notification msgsuccess" id="update" style="display:block;">
<a class="close"></a>
<p>Your Changes were <strong>Successfully</strong> Done! </p>
</div>
<?php } ?>
<?php if($_GET['msg']=="mail") { ?>
<div class="notification msgsuccess" id="update" style="display:block;">
<a class="close"></a>
<p>Your Job is <strong>Successfully</strong> Dispatched! </p>
</div>
<?php } ?>
<?php if($_GET['msg']=="sorry") { ?>
<div class="notification msgerror">
<a class="close"></a>
<p style="background:#FAD5CF">Sorry Your job is not Dispatched Please select active Driver!</p>
</div>
<?php } ?>
<table cellspacing="0" cellpadding="5" class="stdtable">
<tr>
<td>
<img src="images/bluedot.png" class="imgg" /> <strong>New</strong>
</td>
<td>
<img src="images/reddot.png" class="imgg" /> <strong>Cancelled</strong>
</td>
<td>
<img src="images/yellowdot.png" class="imgg" /> <strong>Confirmed</strong>
</td>
<td>
<img src="images/browndot.jpg" class="imgg" /> <strong>Pending</strong>
</td>
<td>
<img src="images/blackdot.png" class="imgg" /> <strong>Posponed</strong>
</td>
<td>
<img src="images/greendot.png" class="imgg"/> <strong>Confirmed Operator</strong>
</td>
<td>
<img src="images/greendot.png" class="imgg"/> <strong>Confirmed Driver</strong>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" class="stdtable" id="dyntable">
<colgroup>
<col class="con0" />
<col class="con1" />
<col class="con0" />
<col class="con1" />
<col class="con0" />
<col class="con1" />
<col class="con0" />
<col class="con1" />
<col class="con0" />
</colgroup>
<thead>
<tr>
<th class="head0">#</th>
<th class="head1">Booking From</th>
<th class="head0">Pickup Postcode</th>
<th class="head1">Phone</th>
<th class="head0">Pickup Time</th>
<th class="head1">Pickup Date</th>
<th class="head0">Status</th>
<th class="head1"> </th>
<th class="head0"> </th>
<th class="head1"> </th>
</tr>
</thead>
<tfoot>
<tr>
<th class="head0">#</th>
<th class="head1">Booking From</th>
<th class="head0">Pickup Postcode</th>
<th class="head1">Phone</th>
<th class="head0">Pickup Time</th>
<th class="head1">Pickup Date</th>
<th class="head0">Status</th>
<th class="head1"> </th>
<th class="head0"> </th>
<th class="head1"> </th>
</tr>
</tfoot>
<tbody>
<? if(count($temp)==0) { ?>
<tr>
<td colspan="14" align="center"><span style="color: red; font-weight: bold;">No records found.</span></td>
</tr>
<? } else { ?>
<? foreach($temp as $k=>$r) { ?>
<tr class="gradeX">
<td class="center"><?=$r['id']?> </td>
<td class="center"><?=$r['booking_from']?></td>
<td class="center"><?= $r['picuppostcode'] ?></td>
<td class="center"><?=$r['phone']?></td>
<td class="center"><? $time = explode(',',$r['picuptime']); ?>
<?= $time[0] ?>hrs <?= $time[1] ?> mnts</td>
<td class="center"><?=$r['picupdate']?></td>
<?php if($r['status']=="New"){?>
<td class="center" title="New" >
<img src="images/bluedot.png" alt="new" /></td>
<?php } elseif($r['status']=="Cancelled") { ?>
<td class="center" title="Cancelled">
<img src="images/reddot.png" /></td>
<?php } elseif($r['status']=="Confirmed") { ?>
<td class="center" title="Confirmed">
<img src="images/yellowdot.png" /></td>
<?php } elseif($r['status']=="Confirmed Operator") { ?>
<td class="center" title="Confirmed Operator">
<img src="images/greendot.png" /></td>
<?php } elseif($r['status']=="") { ?>
<td class="center">No status</td>
<?php } elseif($r['status']=="Posponend") { ?>
<td class="center" title="Posponend" >
<img src="images/blackdot.png" />
</td>
<?php } elseif($r['status']=="Pending") { ?>
<td class="center" title="Pending">
<img src="images/browndot.jpg" />
</td>
<?php } ?>
<td class="center"><a href="ajax/tabledata.php?id=<?=$r['id']?>" class="toggle">Quick View</a></td>
<td class="center"><a href="Map.php?id=<?=$r['id']?>" class="toggle">Show Map</a></td>
<td>
<select name="actionuser" id="actionuser" class="actionuser">
<option value="">--Actions--</option>
<option value="<?php echo $r['id']; ?>" class="quickview">Quick View</option>
<option value="showmap"> Show Map</option>
<option value="dispatchjob"> Dispatch job </option>
</select>
<input type="hidden" name="userid" class="userid" id="userid" value="<?=$r['id']?>" />
<!-- <input type="text" name="id" id="userid" value=<?php echo $_r['id'] ?> /> -->
</td>
</tr>
<!--<tr id="temp" class="gradeX"> </tr>-->
<? } ?>
<? } ?>
</tbody>
</table>
<div id="temp" class="toggledata"> </div>
</div>
</div>
<div class="mainright">
<div class="mainrightinner">
<div class="widgetbox uncollapsible">
<div class="title"><h2 class="chat"><span>Online Drivers</span></h2></div>
<div class="widgetcontent padding0">
<!--<div class="chatsearch">
<input type="text" name="" value="Search" />
</div>-->
<ul class="contactlist" id="driver">
<li class="online new"><a href="#"><img src="images/avatar.png" alt="" /><span><?= $drv['name'] ?></span></a></li>
</ul>
<!--<div class="chatbottom">
<a href="#">+ Add Contact</a>
</div>-->
</div><!--widgetcontent-->
</div><!--widgetbox-->
</div><!--mainrightinner-->
</div>
<?php include("inc/footer.php"); ?>
</div><!--maincontent-->
</div><!--mainwrapperinner-->
</div><!--mainwrapper-->
<!-- END OF MAIN CONTENT -->