title: How to pop up message when click on edit button using javascript
body: <p>I want to popup message box when press edit  button on my php page. After confirmation should pass data to edit page. now data is parsing to edit page without showing message.  Please help me to solve this. </p>
  
  <pre><code>&lt;?php
  include 'connection.php';
  //var_dump($_POST['search']);
  $query= "select * from computer where lab_no like '%".$_POST["search"]."%'";
  //var_dump($query);
  $output='';
  $result=  mysqli_query($conn, $query);
  if(mysqli_num_rows($result)&gt;0){
  
      $output.='
          &lt;table class = "table table-bordered table-hover"&gt;
              &lt;tr&gt;
                  &lt;th style="text-align:center"&gt;Computer Number&lt;/th&gt;
                  &lt;th style="text-align:center"&gt;Computer Name&lt;/th&gt;
                  &lt;th style="text-align:center"&gt;Brand&lt;/th&gt;
  
                  &lt;th style="text-align:center"&gt;Edit&lt;/th&gt;
                  &lt;th style= "text-align:center"&gt;Delete&lt;/th&gt;
              &lt;/tr&gt;';
  
      while($row= mysqli_fetch_array($result)){
          $output.='
                 &lt;tr&gt;
                 &lt;td style= "text-align:center"&gt;'.$row["token_number"].'&lt;/td&gt;
                   &lt;td  style="text-align:center"&gt;'.$row["com_name"].'&lt;/td&gt;
                   &lt;td style="text-align:center"&gt;'.$row["brand"].'&lt;/td&gt;
                    &lt;td style="text-align:center"&gt;&lt;a href=../htdocs/add-com_edit.php?com_num=' . $row["token_number"] . ' \"onclick=\"return confirm("Are You Sure to Update this Record?");\"&gt;&lt;span class="btn-success form-control" style="text-align:center"&gt;Edit&lt;/span&gt;&lt;/td&gt; 
                   &lt;td style="text-align:center"&gt;&lt;a href=\"../htdocs/po_edit.php?ponum=" . $row["token_number"] . "\" onclick=\"return confirm("Are You Sure to Delete this Record?");\"&gt;&lt;span class="btn-danger form-control" style="text-align:center"&gt;Delete&lt;/span&gt;&lt;/td&gt; 
  
  
                  &lt;tr/&gt;';
  
      }
      echo $output;
  
        $output.='&lt;/table&gt;';
  
  }else{
      echo"No Data Found!";
  }
  ?&gt;
  </code></pre>