delete db entry using js
<p>i have three file...
1st index.tpl.php
code of this is</p>

<pre><code>&lt;td&gt;
&lt;input type="button" name="checkbox" value="delete" onclick="selectAccess('&lt;?php echo __('are you sure you want to delete data')?&gt;','&lt;?php echo $sGroups['id_user']; ?&gt;')"&gt;
&lt;/td&gt;
</code></pre>

<p>2nd is common.js</p>

<pre><code>function selectAccess(message,AccessId){

   var answer = confirm(message)
   alert(AccessId);
   if (answer)
   {
     $.ajax({
      url: SITE_URL + '/users/delete',
      type: 'POST',
      data: { 
                'ID':AccessId

            },

      success: function(data){
          alert(data);
      }
     });
   }
}
</code></pre>

<p>here its not working..... plese advice me where is mistake
thnks...</p>
