1

i have problem in displaying retrived data from ajax next to respective row, it is display after table but i want to display it after that particular row and rest of row will be hide. here is my code. response comes from ajax in one form that is fine so i here only post my ajax file and data table where i want to display.

<?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"  />&nbsp;<strong>New</strong>
               </td> 
               <td>
               <img src="images/reddot.png" class="imgg" />&nbsp;<strong>Cancelled</strong>
               </td>
               <td>
               <img src="images/yellowdot.png" class="imgg" />&nbsp;<strong>Confirmed</strong>
               </td>
               <td>
               <img src="images/browndot.jpg" class="imgg" />&nbsp;<strong>Pending</strong>
               </td>
               <td>
               <img src="images/blackdot.png" class="imgg" />&nbsp;<strong>Posponed</strong>
               </td>
               <td>
               <img src="images/greendot.png"  class="imgg"/>&nbsp;<strong>Confirmed Operator</strong>
               </td>
                <td>
               <img src="images/greendot.png"  class="imgg"/>&nbsp;<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">&nbsp;</th>
                        <th class="head0">&nbsp;</th>
                        <th class="head1">&nbsp;</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">&nbsp;</th>
                         <th class="head0">&nbsp;</th>
                          <th class="head1">&nbsp;</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 -->

3
  • Oh man! Code is very unorganized. Can you please be little more clear and organized this will help people help you better. Nov 11, 2013 at 6:20
  • only post code tht relates to issue at hand. Nobody needs to wade through your whole page! Not to mention you loosely mention row ...what row, based on what event? Put little effort into asking concise questions that detail problem so it's easy to follow
    – charlietfl
    Nov 11, 2013 at 6:35
  • sure don't need a bunch of php html parsing code either...if problem is client side, post raw html
    – charlietfl
    Nov 11, 2013 at 6:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.