Hi There,
I have an an ajax request that looks like this,
$('input.fakecheck').click(function(){
alert("deleteing....");
$.ajax({
url:"/search",
type:"POST",
data: $(this).attr('name')+"="+$(this).attr('value')+"&remove=Remove",
success:function() {
alert(data);
}
})
})
This calls a php function which looks like this,
private function _remove_from_short_list($cv_array)
{
if (is_array($cv_array))
{
$short_list = $this->session->userdata('short_list');
$new_list = array_diff_key($short_list, $cv_array);
$this->session->set_userdata('short_list', $new_list);
}
}
Essentiallty what happens is that on my page I have a list which is essentially a list of id's taken out of the session, the user can then by click and input(this will change) delete the id from their session. However once the deletion has taken place I want to be able to refresh the list to show that it has taken place, currently nothing happens, until I manually refresh.