php - Sorting html table based on input field

661

I need to sort the table based on the input field. I want to avoid reloading the table data, that's why I only want to sort the table. Is there any way to do this?

Here is my code:

<div class=buyer_list>
  <div class='ui-grid grid-buyer_list'>
    <div >
      <span>Search By:</span>
      <?php echo '
      <input type="text" method="POST" id="searchdata" name="searchdata">
      <button name="submit" type="submit" id="submit" name="buyer_btnsearch" type="text" onclick="return search_onlookup()" > Search</button>'; ?>
    </div>
    <div class=buyer_list>
      <div class='ui-grid grid-buyer_list'>
        <div class='ui-rowheader'></div>
        <div >
        <?php while($rs1=mysql_fetch_array($result1)):?>
          <div onclick="clckrow(this);"> 
            <div class='ui-coldata col D buyercode'><?php echo $rs1['buyercode'];?></div>
            <div class='ui-coldata col D unitcode'><?php echo $rs1['unitcode'];?></div>
            <div class='ui-coldata col D buyername'><?php echo $rs1['buyername'];?></div>
            <div class='ui-coldata col D tcp'><?php echo $rs1['TCP'];?></div>
            <div class='ui-coldata col D tcppaid'><?php echo $rs1['TCPPaid'];?></div>
            <div class='ui-coldata col D tcpperc'><?php echo $rs1['TCPpercPaid'];?></div>
            <div class='ui-coldata col D bal'><?php echo $rs1['balance'];?></div>
            <div class='ui-coldata col D print'>NO</div>
          </div>
        <?php endwhile;?> 
      </div>
    </div>
  </div>

People are also looking for solutions to the problem: php - Laravel 5: how to reset builtin throttle / ratelimiter?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.