title: Uncaught ReferenceError: id is not defined at HTMLButtonElement.onclick
body: <p>I'm trying to code a detailed ticket information from database that could be deleted by the admin. I want to use jquery ajax to remove it once the user have click on the button</p>
  
  <p>my codes are :</p>
  
  <p>`</p>
  
  <pre><code>&lt;form class="white" method="post" action="" id="frmBA2N29F"&gt;
  &lt;span class="col3"&gt;BA2N29F&lt;/span&gt;
  &lt;span class="col3"&gt;Medan(KNO)&lt;/span&gt;
  &lt;span class="col3"&gt;Jakarta (CGK)&lt;/span&gt;
  &lt;span class="col3"&gt;BA&lt;/span&gt;
  &lt;span class="col2"&gt;BA001&lt;/span&gt;
  &lt;span class="col4"&gt;2016-01-01&lt;/span&gt;
  &lt;span class="col3"&gt;05:00:00&lt;/span&gt;
  &lt;span class="col3"&gt;07:00:00&lt;/span&gt;
  &lt;span class="col1"&gt;60&lt;/span&gt;
  &lt;span class="col3"&gt;560000.00&lt;/span&gt;
  &lt;span class="col3"&gt;560000.00&lt;/span&gt;
  &lt;span class="col3"&gt;280000.00&lt;/span&gt;
  &lt;button class = "delete" type="button" id="deleteBA2N29F" onClick = "delete_row(BA2N29F);"&gt;delete&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>`</p>
  
  <p>my javascript function :</p>
  
  <pre><code>&lt;script type="text/javascript" src="../../JS/jquery-3.1.1.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
  function delete_row(id)
  {
   $.ajax
   ({
    type:'post',
    url:'delete-ticket.php',
    data:{
     delete_row:'delete_row',
     row_id:id,
    },
    success:function(response) {
     if(response=="success")
     {
      var row=document.getElementById("frm"+id);
      row.parentNode.removeChild(row);
     }
    }
   });
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>and my delete-ticket.php code :</p>
  
  <pre><code>&lt;?php
  include_once '../../database.php';
  if(isset($_POST['delete_row']))
  {
   $row_no=$_POST['row_id'];
   mysqli_query($connection,"delete from flight where flight_id='$row_no'");
   echo "success";
   exit();
  }
  ?&gt;
  </code></pre>
  
  <p>The message that I got from my browser is </p>
  
  <pre><code>tiket-list.php:98 Uncaught ReferenceError: BA2N29F is not defined
      at HTMLButtonElement.onclick
  </code></pre>
  
  <p>So what's the error in my code?</p>