[eluser]Unknown[/eluser]
within my view ive got my inbox system and to delete a message ive got an image with class="delete"
calling the following code
Code:
$(document).ready(function(){
$('.delete').click(function(){
$.ajax({
type: "POST",
url: "/index.php/messages/delete",
data: "id="+$(this).prev().text(),
success: function(html){
$('#msg_container').fadeOut('slow').load('/index.php/inbox').fadeIn("slow");}, 20000);
}
});
return false
});
});
my controller is
Code:
function delete() {
$name['delete_me']=$_POST['id'];
$result = $this->user->deletepm($name);
$this->output->set_output('works');
}
but nothing is working help?