0

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.

1
Contributor
1
Reply
8
Views
3 Years
Discussion Span
Last Post by SimonIoa
0

and the html

<span class="reply_stdelete" href="#" id="<?php echo $c_id; ?>" original-title="Delete"></span>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.