Hey there,

I will try and explain this as clearly as possible. I am building a
CMS and i have a list of data, when you click on the "delete" button
next to an item in the list it loads up this function:

function xhrRequest(type, url, data){
        $.ajax({
                type: type,
                url: url,
                data: data,
                cache: false,
                success: function(msg){
                        $("#xhr").append(msg);
                        animation();
                }
        })
}

and the function is called like this: onclick="xhrRequest('GET',
'controllers/page/delete.php', 'id='.$entryID.'')"
So that just brings up a Are you sure you want to delete Yes/No. My
problem is, when you click yes or no, i want to close the ajax
request. Right now, i can hide the div with jquery effects but then
when i click on another delete button, the old request is still
there.

So my question is, how do i "close" or "unload" an ajax request?
Thanks.

Reply via email to