I HAVE A PROBLEM WITH THIS CODE
$('.reply_stdelete').live('click',function()
{
var ID = $(this).attr("id");
//var X=$(this).attr("my");
var dataString = 'c_id='+ ID ;
jConfirm('Sure you want to delete this conversation?', '',
function(r)
{
if(r==true)
{
$.ajax({
type: "POST",
url: "<?php echo $base_url; ?>conversation_delete_ajax.php",
data: dataString,
cache: false,
beforeSend: function()
{
$("#stbody"+ID).animate(
{
'backgroundColor':'#f2f2f2'
},300);
},
success: function(html)
{
window.location='<?php echo $base_url; ?>messages.php';
}
});
}
});
return false;
});
it goes on the message (jConfirm('Sure you want to delete this conversation?) and it dletes the record from the database but it doesnt work asynchronous like ajax.